10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
Sorry if this is a newbie question. I guess you can use either awk or shell script for this sequence of operations, but knowing very little about either of them I'm not sure how I should try to write this.
The basic objective is to copy certain files that are scattered all over my... (10 Replies)
Discussion started by: pc2001
10 Replies
2. Shell Programming and Scripting
awk -F ";" 'FNR==NR{a=$1;next} ($2 in a)' server.list datafile | while read line
do
echo ${line}
done
when i run the above, i get this:
1 SERVICE NOTIFICATION: nagiosadmin skysmart-01.sky.net ....
instead of:
SERVICE NOTIFICATION: nagiosadmin skysmart-01.sky.net ....
can... (4 Replies)
Discussion started by: SkySmart
4 Replies
3. UNIX for Dummies Questions & Answers
If I run a script called 'abc.sh' and then execute the following :
ps -ef | grep 'abc.sh'
I always get two rows of output, one for the executing script, and the other for the grep command that I have triggered after the pipe.
Questions: Why does the second row turn up in the results. My... (10 Replies)
Discussion started by: jawsnnn
10 Replies
4. Shell Programming and Scripting
Can anyone assit me in completing this simple looping problem
allow the user to enter as many number as they want by using a loop. The program will keep asking the user for additional numbers until the user enters 9999. Once the user enters 9999, exit the loop and display a message telling them... (5 Replies)
Discussion started by: campanellisj
5 Replies
5. Shell Programming and Scripting
awk "/^<Mar 31, 2012 : /,0" /app/blah.log
can someone please help me figure out why the above command isn't pulling anything out from the log?
basically, i want it to pull out all records, from the very first line that starts with the date "Mar 31, 2012" and that also has a time immediately... (4 Replies)
Discussion started by: SkySmart
4 Replies
6. Shell Programming and Scripting
1. Create a directory script (project_dir.sh)
· Write a script in your home directory to create a subdirectory called “PROJECT<99>” within your home directory on the Ubantu/Linux server. <99> is your project number (e.g. 01,02,03, ... 15).
· The script must test whether... (1 Reply)
Discussion started by: bugenhagen_
1 Replies
7. Shell Programming and Scripting
Hi All,
I have a big file of 100,000 lines with the following format:
1,736870,736870,1,2,5,547,1253889535,1253889775,240,30,152.163.141.8,US,0,00,-g 1253889445
1,881246,881246,1,2,6,402,1253889535,1253889775,240,30,152.163.141.8,US,0,00,-g 1253889445... (4 Replies)
Discussion started by: toms
4 Replies
8. UNIX for Dummies Questions & Answers
en...how to grep some words from some file,
the goal is that, we donot want the words are exactly 9 charactor,
and want to grep from some words that are longer than 9 and it contain a substring that with 9 different charactors (2 Replies)
Discussion started by: shrimpy
2 Replies
9. UNIX for Dummies Questions & Answers
Hi,
One silly question. I would like to add statement like below and append to a file. I used the below code; however, it does not work. Can anyone please tell me what mistakes I have made?
awk '
{ for (i=1;i<=563;i++)
print i
}'>>output.txt
Thanks.
-Jason (1 Reply)
Discussion started by: ahjiefreak
1 Replies
10. UNIX for Advanced & Expert Users
Guys, this one is rather odd. I've got an array of numbers, and I'm trying to select only the records with the string "Random" in the 4th column. I'm using awk in this format:
awk '{ if (( $6 -eq Random )) print $0 }'
For some odd reason, this is simply giving me the list of all the entries... (4 Replies)
Discussion started by: Khoomfire
4 Replies