1,892 Topics

Member Avatar for
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
68
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
276
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
88
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
114
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
154
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
Member Avatar for MDPGC

I have a script that I have to interpret. I'm really new to shell scripting, however I have tried to explain the lines to the best of my ability. Can you please look at the script and let me know if I am on the right track (also point out …

Member Avatar for MDPGC
0
95
Member Avatar for techie82

Hi I need a Shell script that will download a text file every second from a http server using wget. Can anyone provide me any pointers or sample scripts that will help me go about this task ??? regards techie

Member Avatar for pty
0
86
Member Avatar for yaeli_17

Hi. I need to write a short script that's looking for a C files in a directory (based on whether it has a semicolon in it and a comment // or /*), check if the file ends with .c and rename it if it doesn't. I'm pretty much new at …

Member Avatar for jim mcnamara
0
112
Member Avatar for yannick1985

Hi guys, Can anyone help me with the following question? I am new to Shell Scripting and havent a clue how to use it. This is for a job I have applied for and i have never needed to use linux and have always been a Windows man. I probably …

Member Avatar for masijade
0
103
Member Avatar for Mushy-pea

Hello everyone. I need to write a Bash script to remove blocks of text from a given file. The idea is, the text to be removed will be marked by appearing between certain delimiter characters i.e. [code] Here's some text and ~this bit gets removed~, where tilda is the delimiter. …

Member Avatar for kuom
0
108
Member Avatar for varundba

Hi GURUS, Sorry to disturb you and take your time, I have a small job to do, it is - We will be taking back-up's regularly at certain time intervals according to the non - business hours. Suppose according to the business logic we scheduled a back-up job that takes …

Member Avatar for kuom
0
118
Member Avatar for pallavimahjan

Hi i am facing this problem, please help me in my korn script ------------------------------------------------------------- export $job_ids echo "#Message creation" >message-typing.typ chmod 777 message-typing.typ echo "orderParser:1:999:210:T" >>message-typing.typ echo "*REQUEST=FLOWTHRU;[B]JOBID=${job_ids}[/B];OLD_DD=20050629000000;%" >>message-typing.typ cat message-typing.typ ------------------------------------------------------------- Now the job_ids is a variable consisting of job id, and if u see i have exported this …

Member Avatar for pzwcsx
0
101
Member Avatar for jorritgoddijn

hi, i need to insert a character in a certain text file. i cannot change the original files so i have to work with that, luckily the files are written in a way that at the end of every second line a semicolon ; has to be inserted. How can …

Member Avatar for jim mcnamara
0
96
Member Avatar for bucci

hi experts, i'm new on scripting on sun solaris 8 sparc, need some advices. i have some data in a file like : 20061221 163826.485 20061221 163925.144 058.659 6123456789012 00000E8A 047 08 002 465 00010022 510105642138069 20061221 163915.163 20061221 163925.336 010.173 6123456789012 00000F4F 037 02 002 999 00010022 510103242202784 20061221 …

Member Avatar for jim mcnamara
0
153
Member Avatar for amitc

hey friends, I m in a process of automating Sudo test plan, where i need to invoke another shell within a shell automatically, then need to append a line into that script in sub-shell, then save it and quit from it..all automatically. I m able to do evrything but not …

Member Avatar for ghostdog74
0
122
Member Avatar for googlybear

Hi everyone, I am not really a scripter by nature but now have the need to create one that handles sequential numbering. Basically I need the script to create a sequential number everytime its run. I dont expect anyone to tell me how to do it as i want to …

Member Avatar for googlybear
0
104
Member Avatar for sgriffiths

Hello I have some files with the date included in the filename the format is limited_file_11012007.dat so this is the 11th January 2007 I have numerous files eg limited_file_23012006.dat limited_file_02122005.dat limited_file_23012006.dat limited_file_31032006.dat I want to pick the file that is the closet day after today, ie todays date would be …

Member Avatar for pty
0
96
Member Avatar for lastkey

Hi, I wan tto use 2 variables at same time in single loop. Like [I]for i in vs01a vs01b for k in 1 2 do rsh [COLOR=Red]$i[/COLOR] echo 'tail -20 /opt/oracle/admin/+ASM/bdump/alert_+ASM[COLOR=Red]$k[/COLOR].log' >> VS_logs.txt[/I] how to do it. because for vso1a it's ASM1.log whereas for vs01b it's ASM2.log. help me!!

Member Avatar for lastkey
0
123
Member Avatar for jackjill

Hi all, i'm new in linux environment and have a v. tough task. Please help me how to initiate it. give me some expample scripts.. the prob def is : * i am trying to write a full-screen utility, that displays the permissions of a directory and all the directories …

Member Avatar for jim mcnamara
0
103
Member Avatar for sseenu79

Hi Unix Gurus, I have written a shell script to unfreeze all frozen media in NetBackup. Here is the script written on HP-UX using ksh: *********************************************** set -x cd $HOME rm -f frozentest rm -f mediaserver cd /usr/openv/netbackup/bin/admincmd pbrun ./bpmedialist -summary | grep FROZEN | awk '{print $1 $2}' | …

0
65
Member Avatar for verkiles

Hi , Am new to shell scripting. I wanted to change user using shell script and i just dont know to do it. Thanks!,

Member Avatar for jim mcnamara
0
70
Member Avatar for hillol

Hi im a new one to shellscripting plz see the following code snippet var1=`sqlplus -S eot/eot <<- ! select ID from testhil1; quit !` echo $var1>ron cat ron vari=" " while read line do var2=` echo $line|wc -w |cut -f 1 ` vari=` echo $line ` done<"ron" echo $var2 echo …

0
70
Member Avatar for rchadhaney

Hello everyone. I'm a newbie in shell scripts. I'm trying to write a simple script that will archive a file from one directory to another directory I'm using sqlplus to generate the correct file name. The problem is when I try to use the paremeter from sqlplus it adds a …

Member Avatar for rchadhaney
0
101
Member Avatar for akashag

hi , can ne one help wit it. I need to write a shell script which gives the process ids of all the process of previous day(if running or hung).

0
63
Member Avatar for bmrout007

Hi, i have a file named file1 file1 contains ABCDabcdABCDabcdABCDabcd i want a shell script that will show the contents of file as ABCDabcd ABCDabcd ABCDabcd that means when a capital A is found it will break into another line thanks

0
68
Member Avatar for hillol

hi, can anyone help me how to redirect sql query result to a file in shell scripting using sqlplus. Is the below code snippet corrct: sqlplus -s username/password <<- ! select * from testhil1; quit ! > rony3.txt

0
97
Member Avatar for crab68

grep -v "connected" filename > newfile With regards to the use of grep and then output to a file as it was done in the sample above, are there any limitation to its use especially when the file is big? I have experience record truncation when it is output to …

Member Avatar for crab68
0
2K
Member Avatar for hillol

if i m not clear in the previous post: i have a dat file with two columns. and a database table (oracle).One field of that file nd table r same. i want to match each value of tht column of that table with that of file.pick up the correspionding other …

Member Avatar for masijade
0
45
Member Avatar for hillol

hi i m very new to shell script. my prob: i have a dat file and a database table(oracle). one column of that table and dat file is same. i want to replace another column of that table matching the value of the column of the table with that of …

Member Avatar for jim mcnamara
0
239
Member Avatar for Fr0z3n999

[COLOR=#000000]Can any1 please help me...[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]i'm really lost in using bash shell scripting...[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]and i got to hand this up on monday...[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]please anyone teach me how to do this assignment... [/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]Please use basic things because i just learn the program …

Member Avatar for linux
0
192
Member Avatar for jercos

I'm engaging in a little petty accelleration :P I just wondered if anyone knows a way to make a shell script simpulate keys typed on a keyboard? E.G. I press my xmodmap xbindkeys'd shortcut, it calls 'tag.sh p' and tag.sh somehow sends <p></p>(four right arrow keys) to the current window... …

Member Avatar for jercos
0
100
Member Avatar for crestaldin

Hello Everyone, I need help on a part of the script below.The purpose is to accept some filenames as command line arguments and count the number of characters,words,lines in each file, and the total of each of these 3 attributes. My output should look like this... [COLOR="Blue"]file 1 stats: Number …

Member Avatar for masijade
0
163

The End.