10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In the out.txt below I am trying to use awk to update the contents of $9.. If $9 contains a + or - then $8 of out.txt is used as a key to lookup in $2 of file. When a match ( there will always be one) is found the $3 value of that file is used to update $9 of out.txt separated by a :. So the... (6 Replies)
Discussion started by: cmccabe
6 Replies
2. Shell Programming and Scripting
Hi,
I have an issue where i need to lookup in a given transaction file and if the same transaction is found in another file, then i need to replace a few columns with some other value.
Finally, the changed and unchanged lines must be printed and stored in the same source file.
for example... (5 Replies)
Discussion started by: mansoorcfc
5 Replies
3. Shell Programming and Scripting
I am trying to match $1 in file1 with $2 in file2. If a match is found then $3 and $4 of file2 are copied to file1. Both files are tab-delimeted and I am getting a syntax error and would also like to update file1 in-place without creating a new file, but am not sure how. Thank you :).
file1
... (19 Replies)
Discussion started by: cmccabe
19 Replies
4. Shell Programming and Scripting
Hi one of the output of the command is as below
# sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/'
Resource List : <br>
*************************** 1. row ***************************<br>
... (2 Replies)
Discussion started by: vivek d r
2 Replies
5. Shell Programming and Scripting
Hi,
I am facing issue while reading data from a file in UNIX. my requirement is to compare two files and for the text pattern matching in the 1st file, replace the contents in second file by the contents of first file from start to the end and write the contents to thrid file.
i am able to... (2 Replies)
Discussion started by: seeki
2 Replies
6. Shell Programming and Scripting
I have got about 100 ascii files and I want replace some variable with a new one on an HP-UX system. But I want to put a line of comments before the change. I want to make file1 to file2. I am explaining below.
file1:
line1
line2
export QNAME=ABC
line4
line5
file2:
line1
line2
#... (3 Replies)
Discussion started by: asutoshch
3 Replies
7. Shell Programming and Scripting
Hi,
I have a file with header, detail and trailer records.
HDR|111
DTL|abc|100|xyz
DTL|abc|50|xyz
TRL|150
I need to add the values in 3rd field from DTL records.
Using awk, I am doing it as follows:
awk -F'|' '$1=="DTL"{a += $3} END {print a}' <source_file>
However, I want to... (3 Replies)
Discussion started by: delta21
3 Replies
8. Shell Programming and Scripting
Hi,
I am having 2 servers, Need to delete files from server1 if those files exist in server2 other wise no action using sftp .And the process is non-interactive way. I have got confused how to check the condition in sftp because there is non of the shell condition or loop command is executing.... (2 Replies)
Discussion started by: posix
2 Replies
9. Shell Programming and Scripting
Hi,
I am new to perl.
I want to read from a file on the basis of some conditions..
I want to define parameters in a configuration file in such a manner like...
etc..
in my perl script, theer is a variable like this..
then i want to read values from first if block from the file... (1 Reply)
Discussion started by: shellwell
1 Replies
10. Shell Programming and Scripting
Hi,
I am having a file which contains as below
Names(aaaa
,bbbb
,cccc
,dddd)
now i want the file to be updated with new value 'eeee' as below
Names(aaaa
,bbbb
,cccc
,dddd
,eeee)
Is there a way to script this ?
Thanks, (5 Replies)
Discussion started by: drams
5 Replies