10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
We have a requirement to send email using shell script.email should have html body and pdf attachment. We used uuencode for attaching files and sendmail option to acheive and it is working fine. However custoemr wants to make body of email slightly dynamic. E.g dear customer in html file... (3 Replies)
Discussion started by: Harish7586
3 Replies
2. UNIX for Dummies Questions & Answers
Code :
echo "1,2,3,4"|awk -F "," 'NR==n{$3=a}1' n=1 a=45
Output :
1 2 45 4
Expected :
1,2,45,4 (4 Replies)
Discussion started by: Rajesh_us
4 Replies
3. Shell Programming and Scripting
Hi ,
Please suggest me how do I use : (colon and one space) as a delimiter in awk
Best regards,
Vishal (2 Replies)
Discussion started by: Vishal_dba
2 Replies
4. UNIX for Dummies Questions & Answers
Hi
I am trying to parse the following lines and has to use * (asterisk) as the delimiter.
These lines are in a file, for example tmp.txt and I am using a while loop
tmp.txt:
14-OCT-2012 06:38:59 *... (1 Reply)
Discussion started by: newbie_01
1 Replies
5. Shell Programming and Scripting
# echo "size(JFJF" | awk -F"size(" '{print $1}'
awk: fatal: Unmatched ( or \(: /size(/
the delimiter is "size(" but i'm not sure if awk is the best tool to use to specify it.
i have tried:
# echo "size(JFJF" | awk -F"size\(" '{print $1}'
awk: warning: escape sequence `\(' treated as... (1 Reply)
Discussion started by: SkySmart
1 Replies
6. Shell Programming and Scripting
I have several hundred files that look like this:
ABB110405110000.rawfma8
AAB110405110001.rawhr32
If I use the statement ls | awk '{x=$0;gsub("","",x)
I see that all characters other than 0-9 are eliminated but how do I eliminate all characters including numbers after the "."
In my mind I... (1 Reply)
Discussion started by: rdburg
1 Replies
7. Shell Programming and Scripting
Hi all,
I'm trying to split fields separated by multiple characters :
Here's the string :
"toto"||"ta|ta"||"titi"
Here's what I want :
"toto"||"ta|ta"
I tried several ways, but it seems that my delimiter || is not working :
echo "\"toto\"||\"ta|ta\"||\"titi\"" | awk 'BEGIN... (4 Replies)
Discussion started by: popawu
4 Replies
8. Shell Programming and Scripting
Hello,
an awk style question (or a stupid question... it depends on your point of view :) )
How can I write in one awk command these two ones ?
$USER - `grep $USER /etc/passwd | awk -F: '{ print $5 }' | awk -F, '{ print $1 }'`
Thanks
gb (4 Replies)
Discussion started by: gogol_bordello
4 Replies
9. Shell Programming and Scripting
Hello I need some help in outputting Fields when the delimiter has changed:
echo "test1,test2 | test3,test4,test5" | awk -F"," '{print $1,"COUNT",$2,$4}'
prints out:
test1 COUNT test2 | test3 test5
But how to change the -F"," to -F"|" delimiter, so that it separates the
fields from $2... (2 Replies)
Discussion started by: sdohn
2 Replies
10. Shell Programming and Scripting
Hello All, This work could be very easy for you guys. I would really appreciate help.
input file:
output file: (Desired)
What I am capable of doing:
Command: cat inputfile | awk -F\| '{print "num="$1" value="$2" digits="$3" name1="$4" file="$5" code="$6}' > outputfile
Result what I am... (5 Replies)
Discussion started by: onlyroshni
5 Replies