10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a variable called $a1 which maps to something like "http://servername proxy1 count http" and a lots of entries in a file on remote server.
If I have the following in my .sh script:
sed -i "\%$a1%d" mylog.txtthe line is deleted from mylog.txt. Great.
I'm trying now to remvoe this from a... (3 Replies)
Discussion started by: say170
3 Replies
2. Shell Programming and Scripting
Hi All,
When i am logged into a server , i am able to assign grep value to a variable as follows.
VAR=`grep 'Listener stopped' /logs/perf.log`
However, when i log out of the server, and try to execute the following command by first SSHing into server, it throws error.
$ VAR=`ssh Server... (4 Replies)
Discussion started by: srkmish
4 Replies
3. Shell Programming and Scripting
In awk how would I flatten input.txt to output.txt?
Input:
givenname: Darth
sn: Vadar
mail: d.vadar@deathstar.com
uid: dv12345
orclguid: 1234567890
givenname: Carlito
sn: Brigante
mail: c.brigante@paradise.com
uid: cb12345
orclguid: 2134567890
Output:
... (3 Replies)
Discussion started by: u20sr
3 Replies
4. Shell Programming and Scripting
I am trying to add 0393 value at 24th feild using the below command, but its adding at all the lines including header and trailer
Input file:
ZHV|2657|D0217001|T|TXU|Z|PAN|20131112000552||||OPER|
754|52479|
492|489|SP40|1014570286334|20131111|20131201|14355334|CHAMELON... (1 Reply)
Discussion started by: Aditya_001
1 Replies
5. Shell Programming and Scripting
I would like to know awk command to delete the specific feild from a flat file delimited by '|' if the first feild starts with 354
I tried
awk 'BEGIN {FS=OFS="|"} {$16=""; sub(/\|/, "")}'1
Input file:
354|||||GROUND||97||JUDD STREET|||LONDON||WC1H 9JG|ADI001|
354|||||FLAT 1... (10 Replies)
Discussion started by: Aditya_001
10 Replies
6. Shell Programming and Scripting
sed awk one liner (2 Replies)
Discussion started by: jap2614
2 Replies
7. Shell Programming and Scripting
Hello,
I am strugling from quite a some time to compare flat files with over 1 million records could anyone please help me.
I want to compare two pipe delimited flat files, file1 with file2 and output the unmatched rows from file2 in file3
Sample File1:
... (9 Replies)
Discussion started by: suhaeb
9 Replies
8. Shell Programming and Scripting
hi there
I am trying to get a value from a remote machine into a local variable. To get this value i want to use awk but im having trouble getting it to run, am i escaping in the right places here and using the right quotes (i must have tried a million combinations :()
# VAR=`ssh server1... (5 Replies)
Discussion started by: hcclnoodles
5 Replies
9. Shell Programming and Scripting
I have a file named Atoms that has a list of atoms listed vertically, like:
O
C
Na
etc. There is a variable number of them.
I want to count their occurences in another file. I want to do this by saving each atom as a variable, preferabbly in an associative array, then counting how... (3 Replies)
Discussion started by: RisingSun
3 Replies
10. Shell Programming and Scripting
Hi ,
I have a file with contents as below:
Contract Cancellation Report UARCNCL
LOS CODE DATE REAS TYPE AMOUNT AMOUNT LETTER BY
========= ======= ==== ==== ==== ========= ==== ====
8174739 7641509 1S NONE CRCD 30-JUN-2008 NPAR N .00 .00 CCAN
8678696 8091709 1S NONE DDEB 30-JUN-2008... (14 Replies)
Discussion started by: rkumudha
14 Replies