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
I have files named with different prefixes. From each I want to extract the first line containing a specific string, and then print that line along with the prefix.
I've tried to do this with a while loop, but instead of printing the prefix I print the first line of the file twice.
Files:... (3 Replies)
Discussion started by: pathunkathunk
3 Replies
3. 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
4. Shell Programming and Scripting
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies
5. Shell Programming and Scripting
Hi,
i wrote the script like...
v_date=`date "+%Y%m%d"`;
v_date1="rejects_"$v_date'.txt';
echo $v_date1;
awk -F\| 'NF==4{ print $0>$v_date1;next} NF!=4 {print $0 >"murali.txt";next}' test1.txt
while append data into file as coming like file is $v_date1,but i want data into file... (4 Replies)
Discussion started by: bmk
4 Replies
6. Linux
Hi all,
I have a question..
Here is my requirement..I have 500 files in a path say /a/b/c
I have some numbers in a file which are comma seperated...and I wanted to check if the numbers are present in the FileName in the path /a/b/c..if the number is there in the file that is fine..but if... (1 Reply)
Discussion started by: us_pokiri
1 Replies
7. Shell Programming and Scripting
I have a string like this /Development/ST/st000001su/Outbound/Prod/PROD-732QCJ/63acf2caf91bc136cb9bcce8a85c7fa8/PGP/PGP.txt
I want to remove the PGP.txt and I want only the /Development/ST/st000001su/Outbound/Prod/MCFR-732QCJ/63acf2caf91bc136cb9bcce8a85c7fa8/PGP returned.
I saw an command... (2 Replies)
Discussion started by: srini0603
2 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
I've recently run a script that inserts the filename into all files of my active directory. Now I want to move the filename string and have it replace text a few lines down.
In other words, here's what I'm trying to do. Here is a file called 'goodtimes':
"
goodtimes
Hi, Welcome... (1 Reply)
Discussion started by: calrog
1 Replies
9. Shell Programming and Scripting
I am trying to write a script that prompts users for date and time, then process the gzip file into awk. During the ksh part of the script another file is created and needs to be processed with a different set of pattern matches then I need to combine the two in the end. I'm stuck at the part... (6 Replies)
Discussion started by: timj123
6 Replies
10. Programming
working with the Win32API
I am trying to implement a function in my program that will take the full
filename and path of a shortcut (.lnk) file and returns an std::string that is
the path+filename+arguments of the program to run, and also a STARTUPINFO
structure that can be passed to... (1 Reply)
Discussion started by: cprognew
1 Replies