1,892 Topics
![]() | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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...... | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
hi can anyone please write me a shell script that checks whethera filesystem is full or not hoping to get replies. thanks in advance... | |
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 … | |
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 … | |
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 . … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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, … | |
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 … | |
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 | |
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 … | |
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 … | |
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. … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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!! | |
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 … | |
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}' | … | |
Hi , Am new to shell scripting. I wanted to change user using shell script and i just dont know to do it. Thanks!, | |
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 … | |
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 … | |
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). | |
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 | |
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 | |
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 … | |
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 … | |
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 … | |
[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 … | |
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... … | |
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 … |
The End.