10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
Hi all,
i need a bash script.
I have a 3 file named Milano, Torino, Firenze
Into file i have:
Milano
Marco
Luca
Giorgio
Michele
PatrizioTorino
Marco
Giulio
Emilio
MicheleFirenze
Luca
Giorgio
Marco
Saverio
EmilioThe output should be a all_city.csv file like: (3 Replies)
Discussion started by: kamose
3 Replies
3. Shell Programming and Scripting
hi all,
i had the below script
x=`cat input.txt |wc -1`
awk 'NR>1 && NR<'$x' ' input.txt > output.txt
by using above script i am able to remove the head and tail part from the input file and able to append the output to the output.txt but if i run it for second time the output is... (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies
4. Shell Programming and Scripting
Hi,
I am working on one script..I am having files in the below format
file 1 (each line is separated with : delimeter)
SPLASH:SPLASH:SVN
CIB/MCH:MCH:SVN
Now I want from file 1 that most left part of the first line will store in... (6 Replies)
Discussion started by: rohit22hamirpur
6 Replies
5. Shell Programming and Scripting
Hi -
I have a file containing data like :-
cn=tommy,cn=users,c=uk
passwordexpirydate=20100530130623z
cn=jane,cn=users,c=uk
passwordexpirydate=20100423140734z
cn=michael,cn=users,c=uk
passwordexpirydate=20100331020044z
I want to end up with a file that looks like:-... (6 Replies)
Discussion started by: sniper57
6 Replies
6. Shell Programming and Scripting
i have one file
abhi.txt
its contents are
home8/mc09ats/UnixCw/backup/file1
home8/mc09ats/file2
i want to read this content of file using while loop..
in this i want to seperate the content as follows
path=home8/mc09ats/UnixCw/backup
file=file1
echo path
echo file
can you... (1 Reply)
Discussion started by: AbhijitIT
1 Replies
7. Shell Programming and Scripting
Hello ,
I have huge file with below content. I need to read the numeric values with in the paranthesis after = sign. Please help me with awk and sed script for it.
11.10.2009 04:02:47 Customer login not found: identifier=(0748502889) prefix=(TEL) serviceCode=().
11.10.2009 04:03:12... (13 Replies)
Discussion started by: rmv
13 Replies
8. Shell Programming and Scripting
help me pls.. :(
i want to read a mapping file.
Below is the content of my mapping file.
6221,189,SMSC1,OMC1,WAP1
6223,188,SMSC2,OMC2,WAP2
so when my program running
msisdn="622130302310"
while not EOF
if substring($msisdn,1,4) == "6221" -- > "6221" read from the file
then
echo... (0 Replies)
Discussion started by: voidmain
0 Replies
9. Shell Programming and Scripting
Hi,
I have two files with the format shown below. I need to read first field(value before comma) from file 1 and search for a record in file 2 that has the same value in the field "KEY=" and write the complete record of file 2 with corresponding field 2 of the first file in to result file.
... (11 Replies)
Discussion started by: King Kalyan
11 Replies
10. AIX
Hi,
I am trying to find the content of file using grep and find command and list only the file names
but i am getting entire file list of files in the directory
find . -exec grep "test" {} \; -ls
Can anyone of you correct this (2 Replies)
Discussion started by: madhu_Jagarapu
2 Replies