1,978 Topics

Member Avatar for
Member Avatar for pichels

Hi, I have created a convaluted and hacked script here for comparing unix dates. Can someone help me use calc or date w/ julian param or something to look back a week, a month or even a year and compare dates or add/subtract the dates somehow in a shell script? …

Member Avatar for dsmall
0
606
Member Avatar for slbit

I have a text file with hundreds of names i would like to search in the database, yet to perform this query the names have to be on one line separated by commas. the text file is as follows Mike Ralph Cindy Claire John the output i need is Mike,Ralph,Cindy,Claire,John …

Member Avatar for slbit
0
105
Member Avatar for slbit

Dear Experts, to give a better picture i will explain the directory structure first the files have the same naming convention and the only difference is the first letters which is the title of that account, there is a total of 210 files only the bold letters change for each …

Member Avatar for slbit
0
137
Member Avatar for peacesam

Hi, I need some guidelines to start coding a shell script that will provide the administrator with the shutdown options : -shutdown -now shutdown -h ? -shutdown [time] , which i have no clue how to use a variable so the user can manually select a time to shutdown. -shutdown …

Member Avatar for peacesam
0
95
Member Avatar for jermane

Hello, i'm taking my first class in linux and i am working on a script that will display 3 random number and display amount of jackpot, the script should act like a "slot amchine game". I have two problem one is the statement "You are a loser" is diaply even …

Member Avatar for mittelgeek
0
122
Member Avatar for world_weapon

Hello everyone, was wondering if any of you might happen to know something that can help me. I've been searching the net for a way to get GNOME to change its resolution from a script. I can call gnome-display-properties but that pulls up a gui. Basically I am writing a …

Member Avatar for world_weapon
0
129
Member Avatar for alexxxprog

Thank you very much for who can solve this bash script: "Create a bash procedure createdata that creates collections (directories) that that will have to contain a random number, comprised between 300 and 600, of binary files of dimension comprised between 10 Kbytes and 30 kbytes. Also the names of …

Member Avatar for alexxxprog
0
211
Member Avatar for Toktam
Member Avatar for jbennet
0
137
Member Avatar for kholloi

Hi Guys, I am using a BASH script to add users to an ACL in the squid.conf file. Basically the script searches for a string and adds a variable to the end of the string like this: [code] cat /etc/squid/squid.conf | awk "/INTERNET/{ $0=$0 " $UNAME" } {print} " > …

0
58
Member Avatar for atul_saxenas

Hi I am a new bee in Unix World. I need a little help regarding my problem. I want to swap two file which i will passing as command line argument. I can swap the two files but i am unable to check whether the file name passed in the …

Member Avatar for ghostdog74
0
86
Member Avatar for justsomerat

How to compare a number stored as string to an integer value in shell scripting? Here is what I have, if [$temp -ge 2.5] then; when I run the above code, it gives the error as "Integer Expression expected". Here the temp variable contains the number "3.0" as a string, …

Member Avatar for mittelgeek
0
225
Member Avatar for bergy_nj

Hi.. im a newbie in shell scripting, and also new in this forum.. i understand the command below is just reading from /etc/passwd and getting whatever in field 1 and 3 (which are username and userID) after the cut the format will be username:uid my guess,its making the array with …

Member Avatar for ghostdog74
0
123
Member Avatar for squinx22

hi, Is it possible to run a gedit command in the terminal that will create a text file automatically and save it in my desired file extension? For example, if I run: gedit file.txt by default, it will open a null document named file.txt. But all I want is to …

Member Avatar for thekashyap
0
80
Member Avatar for samirs79

[COLOR=#000000]Hi Code gurus!!...my first post in this forums and I m new to shell scripting too!...I need a shell script to accomplish the below, any input will be greatly appreciated..[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000][/COLOR] [COLOR=#000000]Below is a sample content of a text file, [B]file1.txt[/B][/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]AMPS,2324,Subscriber,Unknown,SingleDay,20070413,20070413,[/COLOR] …

Member Avatar for samirs79
0
127
Member Avatar for bufospro

Hi all, I am new in shell scripting and I would like to make a bash script which will inform me if one of my friend is already logeed in. If a friend is logged in I want to take as output USER1 : is in. else USER1 : last …

Member Avatar for ghostdog74
0
139
Member Avatar for migg_21

awk '{print NR SEP $0}' SEP="/ " exfile1.txt > try2.txt here is a awk scritp which copies the contents form one to anthor it works well, but how do I change it to copy the contents in to several files ? can any one help please

Member Avatar for ghostdog74
0
178
Member Avatar for gogo3624

I'm trying to add a zero at the end of the data that start with 62018 (it will always start with 62018) UNB+UNOA:1+5030917029608:14+5000119000006:14+070509:0850+62018000100020[B][U][COLOR=red]0[/COLOR][/U][/B]++INVOIC any help would be appreciated. Thank you JG

Member Avatar for masijade
0
74
Member Avatar for markchicobaby

Hi i'm using Cywin bash shell, I am trying to scan my entire hard drive for an executable that contains text references to an ocx called ezVidC60.ocx (it appears to be used by both malware and non malware programs, I need to work out which). In Windows the dll and …

Member Avatar for markchicobaby
0
109
Member Avatar for rusman

Hello everyone, Given a list of output that looks like this (from NetBackup bpimagelist if any of you are familiar), I need to pick out the last full backup closest to the end of the quarter (3/30, 6/30, 9/30 12/31). 10/20/2006 21:24 INFINITY 146144 64213523 N Full Backup 10/13/2006 21:46 …

Member Avatar for jim mcnamara
0
154
Member Avatar for obscured47

hey guys, can anyone tell me what's wrong with my code? im trying to test if the input ($no) is a number: [code] read no echo $no | egrep - c "^[0-9]*$" | wc -l > y [/code] y now should be 1 if the user enters a number but …

Member Avatar for obscured47
0
98
Member Avatar for PriusDriver07

Hello Master Scripters, I am in scripting nursery and I am trying to write a script that will replace string a with string b. I can get my script to replace single strings with no problem, my issue arrives when one of my strings has two words. I am pretty …

Member Avatar for Infarction
0
117
Member Avatar for jibsonline

Hi, I'm new to shell scripting. I need to make a script to add on to my cronjobs. The script must get the value of load average from my server and if its greater than 10 it should stop my apache service. I cant find a way to get the …

Member Avatar for sn4rf3r
0
122
Member Avatar for KoubaK

hey, guys im new to UNIX and i need help.. I need to write a script which will tell you if you entered an even (e.g., 2, 4, 6...) or odd number (e.g., 1, 3, 5...) and then give you the summation of the number you entered. For example, if …

Member Avatar for KoubaK
0
98
Member Avatar for milonix

i am looking for a good tut for shell scripting if anyone know's a good please post here thanks :)

Member Avatar for jaepi
0
94
Member Avatar for livingsword

hi, i have just started with scripting and read several tutorials. But i have some doubts, 1) How do i print the file access permission(FAP),... not changing the FAP... but printing it ?? 2) how to search for duplicate files in current directory ? 3) how do i validate a …

Member Avatar for jbennet
0
119
Member Avatar for srikanthgr1

Hi All, We now have a Log file which has time stamps of all the scripts ran. It has start time and end time. I now have a requirement to send mail to the Admin after the script finishes running. Can some one help me with a Script which will …

Member Avatar for masijade
0
119
Member Avatar for fresher

Hi, I was just wondering if there is any difference between the following below: [B]1.[/B] function[B] func_name() [/B]{ //bash statements } and... [B]1. [/B]function[B] func_name [/B]{ //bash statements } NB: diff b/w 1 and 2 is that there's no () in 1... Also how can a function be defined inside …

0
69
Member Avatar for fresher

Hi all, anyone tried HLS firewall? [URL]http://homelansecurity.sourceforge.net/[/URL] Basically, i am designing a web based front end (using php) for this program so i have completely 'turned off' custom.conf. The idea is that for instance if i want to block icmp pings, i'll just click a check box say, which then …

0
86
Member Avatar for milonix

i wrote this script, and everytime i run the script the code deletes and i want to know why EDIT: i also chmod 755 if anyone wanted to know [code] $ cat > ispostive #!bin/sh # # Script to see whether argument is postive # if test $1 -gt 0 …

Member Avatar for milonix
0
108
Member Avatar for fresher

Hi, im in the process of developing an iptables firewall for personal use...Being a newbie in shell scripting im trying to adapt a code i found here:[URL]http://homelansecurity.sourceforge.net/script.php[/URL]. thanks to [J. Howard.] but dont quite understand this block of code below especially the content of '$1' variable as related to the …

Member Avatar for fresher
0
278
Member Avatar for jamshid

hi DW Shell Script Kings :) i have some problem in a step of my assignment. thats i can read the file with this : [CODE] #Read all text from file echo -n "Enter file name: " read fileName while read inputline do echo $inputline done < $fileName [/CODE] how …

Member Avatar for jamshid
0
93
Member Avatar for kaitlyn

I am using an array (clmlist01). I have 61 of these and have 4 or more references to each one in a block of code that I do not want to have to hardcode 61 times. With that being said, I am creating a varible and going through a for …

Member Avatar for thekashyap
0
96
Member Avatar for ryanokc

1) I need to create a simple bash shell script that will promt the admin for a user name and then create the user account and change password... thx a lot......

Member Avatar for thekashyap
0
142
Member Avatar for PrabhuScript

Hi Experts I've less idea abt unix shell script. my requirement is the shell script should take a input of a file name and shud check if that file name is present in the particular folder which is hardcoded. if not then wrtie the file there or if found write …

Member Avatar for thekashyap
0
89
Member Avatar for dianabippu

I wrote a script as below #!/bin/bash echo $1 > temp cat $2 >> temp mv temp $2 # this command helps us to retain the original name of the file # now how to append the script so tht it now inserts the first argument into the middle of …

Member Avatar for thekashyap
0
115
Member Avatar for ShaneUniStudent

Hey guys, i am about to throw it all in because i just cannot get this to work :S. All i wanted to do is search through a file and find a string and replace with an argument from the command line. So basically i have a file which has …

Member Avatar for ghostdog74
0
206
Member Avatar for ripper

i need to find if the system has the latest version of a particular package and install if it dosent. how do i compare the versions? assume that i use rpm to find the installed version and a separate file has info of the required(latest) version. how do i do …

Member Avatar for ajcamp
0
98
Member Avatar for ajayyadavmca

I want to mount windows share folder in linux. I m using Samba.. please tell me i need to do some thing on windows side or not.. I m able to see linux folder in windows ... but not reverse... i given command.. mount -t smbfs -o username=guest //1.7.9.1/Build_stage /mnt/ntserver …

Member Avatar for wackley
0
86
Member Avatar for maxcell

Hello, I'm still new to linux, and im looking for some helpful ideas. What I'm trying to do is I need to write a script that will take a text file, which has paragraphs and create another text file which extracts every individual word from that orignal text file and …

Member Avatar for ghostdog74
0
86
Member Avatar for radhikaDS

hi can anyone please write me a shell script that checks whethera filesystem is full or not hoping to get replies. thanks in advance...

Member Avatar for thekashyap
0
75
Member Avatar for geetha_sg

hi friends,,, I have two type of files one .txt format another one is .idx format.. txt file have 7 columns delimited with "|" idx file have 7 columns demilited with "," i have to compare the txt file 2nd and 3rd column with idx 3rd and 4th column. Here …

Member Avatar for thekashyap
0
84
Member Avatar for jorritgoddijn

Hi i got many files which look like this: relation: xxxxxx birthday: xxxxxx age: xxxxxx livingsituation: xxxxxx place: xxxxxx school: xxxxxxx job: xxxxxxx but i also got other files which look like this: relation: xxxxxx age: xxxxxx livingsituation: xxxxxx place: xxxxxx job: xxxxxxx in which xxxxxx is variable My problem …

Member Avatar for thekashyap
0
76
Member Avatar for scotty_123

I hava problem with bash srcipt that removes all files ( with name given in $1 ) in current dir and subdirectories . The problem is that the script don't see all subdirectories and when I try to run it in my home dir the srpit display strange message . …

Member Avatar for Infarction
0
75
Member Avatar for santhosheph

Hello Freinds, I am in need of a shell script whiich rsyncs a folder from a server to my machine. My major concern is not a script that rysnc's but it should send a mail if the rsync failed for some reason while copying the files.. For example the remote …

Member Avatar for rggjan
0
345
Member Avatar for xgringo

PQPZ3.DATR.QRL.R9529.D090295.T19501.das.1333332287722.1.2.err I have AIX so I can't use rename hopeing for something easier but I need to find all the files in the directory and then any of them that have a .err on them I need to be able to rename them back all the way to the .das …

Member Avatar for masijade
0
139
Member Avatar for SIL3NCE

I need help immediately. When/if help is recieved I will pay $20 Paypal right away. Make the script as described below and email detailed instructions in either Word (preferred) or Word Perfect format. If you don't have either word programs Wordpad will do. I need this in my hands at …

Member Avatar for masijade
0
155
Member Avatar for hbmarar

Hi, Wishes. I am not comfortable with shell scripting though know a bit here and there. I believe the listing of a directory using php logic alone would not give appreciable performance if i have lots of nested directories. I really believe a shell commands would solve this and would …

Member Avatar for digital-ether
0
91
Member Avatar for jigar.ec

hello friends, can anyone send me a idea or a project in C and working in Linux Environment... I am a beginner user of Linux..And wanna be good at it...Also i am having my project to be made in Linux which has to be done by 2-3 months...So plz do …

Member Avatar for John A
0
91
Member Avatar for nathanpacker

Hey, I hope I'm posting this in the right forum. I'm compressing a bunch of files to tar.gz, then uploading them to my webhosts ftp server, and then trying to uncompress them on my server using a php script that enables me to run some shell commands (since we don't …

Member Avatar for nathanpacker
0
123
Member Avatar for newbie06

[COLOR=#000000]Hi everybody[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]Linux and tcl are my new platform of operating system. So I am still in the process of learning and adapting. I am using network simulator 2 as my simulator and now I am having problem with my tcl script in which during the simulation process, …

0
50

The End.