10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi..
May be a simple question but I just began to write unix scripts a week ago, for sorting some huge amount of experiment data, so I got no common sense about unix scripting and really need your helps...
The situation is, I want to read the nth word of mth line in a file, and then store it... (3 Replies)
Discussion started by: freezelty
3 Replies
2. Shell Programming and Scripting
Is there an awk script that can easily perform the following operation?
I have a data file that is in the format of
1944-12,5.6
1945-01,9.8
1945-02,6.7
1945-03,9.3
1945-04,5.9
1945-05,0.7
1945-06,0.0
1945-07,0.0
1945-08,0.0
1945-09,0.0
1945-10,0.2
1945-11,10.5
1945-12,22.3... (3 Replies)
Discussion started by: ncwxpanther
3 Replies
3. Shell Programming and Scripting
For example i'm having the below contents in a file:
expr is great when you want to split a string into just two parts. The .* also makes expr good for skipping a variable number of words when you don't know how many words a string will have. But expr is lousy for getting, say, the fourth word... (2 Replies)
Discussion started by: bangarukannan
2 Replies
4. Shell Programming and Scripting
Hi people;
i want to read the last word of the 14th line of my file1.txt. Here is the EXACT 14th line of the file.
250 SectorPortnum=3,AuxPortInUngo=2,PortDeviceGroup=1,PortDeviceSet=1,PorDevice=1 20 >>> Set.
i have to get the word Set. how can i call it and also how... (3 Replies)
Discussion started by: gc_sw
3 Replies
5. UNIX for Dummies Questions & Answers
Hi my unix friends,
How do I grep a word and next line with solaris 10.
tnx
Mehrdad
---------- Post updated at 03:17 PM ---------- Previous update was at 03:09 PM ----------
I found this one:
cat <file_name> | awk '/<seek_word>/ {print;getline;print}' (3 Replies)
Discussion started by: mehrdad68
3 Replies
6. Shell Programming and Scripting
Hi all,
I'm a noobie at shell scripting (and Linux) with no experience on programing.
I'm trying to create a script that will download my xml calendar from Google, process it in the format and dump it into $HOME/.calendar/calendar.
Eg:
April 10 Event
I'm having a hard time using... (4 Replies)
Discussion started by: victorbrca
4 Replies
7. Shell Programming and Scripting
for example:
searches only for single word
for single word
this is line three
match=$(grep -n -e "single" data.txt)
this command will stored "..... single ...... single" into search.
how can i grep the single word just from line 2 only?? (3 Replies)
Discussion started by: blurboy
3 Replies
8. UNIX for Dummies Questions & Answers
Hi there,
Is there a way to grep a word from a line and display only the words beginning from the search word? Say I have a file named file.txt that contains below:
I am a file
Hello there Reader Orbix
I hope you feel good today
What I want is to grep the word "there":
$ grep "there"... (2 Replies)
Discussion started by: Orbix
2 Replies
9. Shell Programming and Scripting
hi,
how to print a row which contains a perticular word in its third column using grep, cut,
or any thing else.
thanks (2 Replies)
Discussion started by: useless79
2 Replies
10. Shell Programming and Scripting
Greetings.
I am struggling with a shell script to make my life simpler, with a number of practical ways in which it could be used. I want to take a standard text file, and pull the 'n'th word from each line such as the first word from a text file.
I'm struggling to see how each line can be... (5 Replies)
Discussion started by: tricky
5 Replies