10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I call my bash shell script "test.sh" and pass "admin_usr.txt" as an argument like below.
./test.sh admin_usr.txt
Inside the "test.sh" i wish to check if the filename passed "admin_usr.txt" i.e "$1" contains the string "admin" or not ... which in this case it does.
Note: I do not wish to... (5 Replies)
Discussion started by: mohtashims
5 Replies
2. Shell Programming and Scripting
Hi Gurus,
I have two big files. I need to compare the different. currently, I am using
sort file1 > file1_temp;
sort file2 > file2_tmp
diff file1_tmp file2_tmp
I can use command
grep -v -f file1 file2
just wondering which way is fast to compare two big files.
Thanks... (4 Replies)
Discussion started by: ken6503
4 Replies
3. Shell Programming and Scripting
i have this line of code that looks for the same file if it is currently running and returns the count.
`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l`
basically it is assigned to a variable
ISRUNNING=`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh |... (6 Replies)
Discussion started by: wtolentino
6 Replies
4. Shell Programming and Scripting
hi all,
i need to combine these files into one csv file.
Bounce_Mail_Event_Daily_Report_01_Jul_2012.csv
Bounce_Mail_Event_Daily_Report_02_Jul_2012.csv
Bounce_Mail_Event_Daily_Report_03_Jul_2012.csv
Bounce_Mail_Event_Daily_Report_04_Jul_2012.csv... (10 Replies)
Discussion started by: makan
10 Replies
5. Shell Programming and Scripting
I am attempting to grep an exact string from a series of files within a directory and append that output to the filename when it is present in the file. I've been after this all day with no luck. Thanks for your help in advance :wall:. (4 Replies)
Discussion started by: JC_1
4 Replies
6. Shell Programming and Scripting
Hi,
I am new to shell scripting.
please help me to find out the solution.
I need a script where we need to read the text file(consists of all file names) and get the file names one by one
and append the date suffix for each file name as 'yyyymmdd' .
Then search each file if exists... (1 Reply)
Discussion started by: Lucky123
1 Replies
7. Shell Programming and Scripting
Hey guys,
here is my code:
#!/bin/bash
filter=('ubb' 'um2' 'uuu' 'uvv' 'uw1' 'uw2' 'uwh')
let num=`ls -l | grep 'sk' | wc -l`
read -a lines <<< `ls -l | grep 'sk' | awk '{print $8}'`
let finum=${#fi}
for ((i=1;i<=$num;i++))
do
for ((c=4;c<6;c++))
... (2 Replies)
Discussion started by: jkobori
2 Replies
8. Shell Programming and Scripting
My requiremeny is as follows,
I have two files
file a
A BONES RD,NHILL,3418,VIC
37TH PARALLEL RD,DEEP LEAD,3385,VIC
4 AK RD,OAKEY,4401,QLD
A & J FARRS RD,BARMOYA,4703,QLD
A B PATTERSON DR,ARUNDEL,4214,QLD
A BLAIRS RD,BUCKRABANYULE,3525,VIC
file b
A BONES... (12 Replies)
Discussion started by: feelmyfrd
12 Replies
9. Shell Programming and Scripting
Hi All, I need to grep few files which has words like the below in the file name , which i want to put it in a file and and grep for the files which contain these names and move it to a new directory ,
full file name -C20091210.1000-20091210.1100_SMGBSC3:1000... (2 Replies)
Discussion started by: anita07
2 Replies
10. Shell Programming and Scripting
Hi,
I have a question on bash. Basically I would like to print a file name using bash. I am actually trying to grep a particular character in sequential files.
I have alot files such that a.txt, b.txt,c.txt...etc.
If I found a certain character, I would print that particular filename.
I... (5 Replies)
Discussion started by: ahjiefreak
5 Replies