9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Experts,
I am writing a script and struct at a part Need your help to get this
I have a file generated called /tmp/testify.log
$ cat testify.log
Machine Parts 6 DREE
Mufler Strengths 33 XYNC
Siscos 20 09 ABSC... (7 Replies)
Discussion started by: itsme488
7 Replies
2. Shell Programming and Scripting
i have file as with the below content
aaa.bbb.cc.dd
aaa.fff.bb
yyyyy.rrrrr.ggggg.iii
wwww.w.r.ty
i want the o/p as below
dd
bb
iii
ty
but i dont want to use awk. is there any other way to do this ? (5 Replies)
Discussion started by: anandgodse
5 Replies
3. Shell Programming and Scripting
I want to use awk instead of cut command.
Following is my code:
line="slNumber=US78AJF11643, slName=USJFKAAUSYDAAUL80441032900095, dummy sl found? sqlca.sqlcode=0"
sl_WORD=`echo $line| cut -f 1 -d','`
sl=`echo $sl_WORD | cut -f 2 -d'='`
echo "$sl"
Please suggest me about the code.
... (5 Replies)
Discussion started by: rinku
5 Replies
4. Shell Programming and Scripting
how would i write a shell script to show the number of lines in which int variable appears in a c++ program.
how would i do this using cut or awk methods is it possbile and having a output similar to this
x, number of apperances =
y, number of apperances = (2 Replies)
Discussion started by: deadleg
2 Replies
5. UNIX for Dummies Questions & Answers
Hi I'm new to unix programming so struggling with something thats probably simple to many of you
I have data files of the format :
ID, date, value1, value2, blank
on each line either value1 or value2 will be zero. I need my output file to contain
ID, date, non-zero value
The input... (3 Replies)
Discussion started by: thewench
3 Replies
6. Shell Programming and Scripting
i was trying to work on program to look for users never log on sever.. using awk
with awk is working
last| awk '{print $1}' |sort -u > /tmp/users1$$
cat /etc/passwd | awk -F: '{print $1}' |sort -u > /tmp/users2$$
comm -13 /tmp/users$$
rm -f /tmp/users$$
with cut it is not working
... (3 Replies)
Discussion started by: macrules
3 Replies
7. Shell Programming and Scripting
select some fields from data file (source.csv)
The data in file(source.csv) is like
"x1,2",,"y",,"z"
How to get the 1st, 2nd and 3rd field from the file. Using awk or cut?
Note: "x1,2" is one field.
thanks, (16 Replies)
Discussion started by: anypager
16 Replies
8. Shell Programming and Scripting
Hi, I'm very new to scripting.
grep $s $filename | awk '{print $2}' | cut -c 1-8
How can I optimize this using a single awk?
I tried:
awk '/$s/ {print $2}' $filename | cut -c 1-8
However didn't work, I think the awk is not recognizing $s and the verbal is something else. (6 Replies)
Discussion started by: firdousamir
6 Replies
9. UNIX for Dummies Questions & Answers
Hi Gurus!
I recently got my shell account (HP UX v11) created by our sysadmin and am having problem deleting with the backspace key.
After doing some reading, I believe I need to enter a custom "STTY..." statement in my profile.
Can someone please help me with the correct "STTY" sequence... (3 Replies)
Discussion started by: alan
3 Replies