10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi guys,
I wrote the following function to compare two csv files column by column.
However, sometimes the input needs to be sorted before parsing it to awk.
I can do this by changing the awk arguments, but I would like to make this variable if possible. The below doesn't work since the... (3 Replies)
Discussion started by: Subbeh
3 Replies
2. Shell Programming and Scripting
Dear All ,
i stuck in one problem executing xml .. i have input xml as
<COMMAND name="ARRANGEMENT.WRITE" timestamp="0" so="initial">
<SVLOBJECT>
<LONG name="CSP_PMNT_ID" val="-1"/>
<MONEY name="CSP_CEILING" amount="0.0" currency="AUD"/>
... (6 Replies)
Discussion started by: arvindng
6 Replies
3. Shell Programming and Scripting
HI,
MY question is a very simple one:
if i want to call an awk script with the input file name and also pass a variable value , then how to do it.
#>awk -f my_script.awk -v variable=value my_inputfile.txt
I can't do it like this.
throws error:
awk: my_script.awk:18:... (0 Replies)
Discussion started by: Onkar Banerjee
0 Replies
4. Shell Programming and Scripting
Hi,
I would like to compare 2 files using awk, which I can do by using:
awk 'NR==FNR{a;next} (NR > 32 && $2 in a) {print $0}' File1 and File2.
If the name of the File1 is in another file (for example, column 4 in File 3) then how can I pass this column 4 to the awk command.
Thanks in... (1 Reply)
Discussion started by: ezhil01
1 Replies
5. Programming
Hi everyone,
Can anyone tell me how to take contents of a variable as a pattern for awk command. Am doing as below, but doesnt get any output:
$c = "Tue Dec";
$log = ` awk '/ \$c /' in.txt`;
print $log; (7 Replies)
Discussion started by: anandrec
7 Replies
6. Shell Programming and Scripting
Hi Gurus,
I need a suggestion, please help. I have a input file as below :
abc.txt :
*
xxxx: 00000
xxxxx: 00000
xxxx: RANDOM
xxx: RANDOM
**************************xxxxxxx***
* abc
******************************
abc:
abc: ... (3 Replies)
Discussion started by: arunshankar.c
3 Replies
7. Shell Programming and Scripting
Hi all,
I'm not exactly a shell script guru, so this is probably a very silly question and I'm not seeing the point, but you know, sometimes it happens...
I have this script which adds entries to local arp cache using it to find the corresponding IP address.
# export MAC=00:25:90:34:3d:f2... (16 Replies)
Discussion started by: micantox
16 Replies
8. UNIX for Advanced & Expert Users
According to the POSIX specifications eval is a special shell built-in, which should imply that variable assignments specified together with it should remain in effect after the built-in completes. Thus one would expect IFS to be changed after this:
var=$'a\nb c'
$ IFS=$'\n' eval '
for i in... (4 Replies)
Discussion started by: Scrutinizer
4 Replies
9. UNIX and Linux Applications
Hi
I am trying to edit a csv file. Bacically I need to input a search variable and the value that must be changed in one of the fields corresponding to that searched variable.
My csv file looks like so:
1,1A,5
1,1B,2
1,1C,3
2,2A,7
2,2B,4
2,2C,0
3,3A,1
3,3B,6
3,3C,4
I want to... (4 Replies)
Discussion started by: ladyAnne
4 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I have multiple functions that can be called by any shell script. These functions have inbuilt echo statements to logs their activity into a log file. When I run multiple shell scripts that call these functions, they all log into the same log file and I am not able to differentiate which... (2 Replies)
Discussion started by: new_learner
2 Replies