10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi fellow linux-ers,
I have a quick question for you. I have the following text, which I would like to modify:
10 121E(121) 16 Jan
34S 132E 24 Feb
42 176E(176) 18 Sep
21S 164E 25 May
15 171W(-171) 09 Jul
How can I do the following 2 modifications using sed and/or awk?
1. in 1st column,... (1 Reply)
Discussion started by: lucshi09
1 Replies
2. Shell Programming and Scripting
Hello,
I have the following line in one of my shell scripts. It works fine when the search string($SERACH_STR) exists in the logfile($ALERTLOG) but if the search string does not exist this line errors out at run time. Is there a way to make this line return 0 if it is not able to find the... (4 Replies)
Discussion started by: luft
4 Replies
3. Shell Programming and Scripting
hey,
Im just wondering is there away to get sed to read from a variable
eg
it doesn't seem to work, i really need to be able to recursively change the same data set... (2 Replies)
Discussion started by: vbm
2 Replies
4. Shell Programming and Scripting
I have a line
EXTDIR=`echo $i | sed 's/\-tar.gz//'`
which looks for files ending in -tar.gz, i would like to increase the functionality so that it looks for .tar.gz files as well as -tar.gz. Do i put the - in square brackets with a dot ? like this
EXTDIR=`echo $i | sed 's/\tar.gz//'`
... (1 Reply)
Discussion started by: hcclnoodles
1 Replies
5. UNIX for Dummies Questions & Answers
from command prompt I did grep two words on a same line for eg: grep abc | grep xyz and I got tht particular line, but I want to know when I vi that file how to directly search for that particular line? I appreciate if any one can provide answer, thanks in advance (2 Replies)
Discussion started by: pkolishetty
2 Replies
6. UNIX for Dummies Questions & Answers
Hi guys
sed -e "s/$<//g"
the $< can allow me to assign an input value to the variable right?
do the double quotes check the previous context? (1 Reply)
Discussion started by: hamoudzz
1 Replies
7. UNIX for Dummies Questions & Answers
hi guys
trying to understand what this line means
sed is a stream editor and i understand that, i have a file already selected
i want to edit so i use -e
sed -e
the next stesp is s/$*
s is a subsititute replacement
sed -e s/$*//g
$ is in reference of the last line
/g makes it... (2 Replies)
Discussion started by: hamoudzz
2 Replies
8. UNIX for Advanced & Expert Users
This "SHOULD" be a simple question,
but looking through several books has turned up nothing,
so I turn once again to the experts!!
How do you vi a file so that you can see special characters.
I believe my /etc/passwd file is being corrupted during an upgrade process, however the files... (6 Replies)
Discussion started by: Recon
6 Replies
9. UNIX for Dummies Questions & Answers
Hello There!
I am trying to write this SIMPLE script in Bourne Shell but I keep on getting syntax errors. Can you see what I am doing wrong? I've done this before but I don't see the difference. I am simply trying to take the day of the week from our system and when the teachers sign on I want... (7 Replies)
Discussion started by: catbad
7 Replies
10. UNIX for Dummies Questions & Answers
Wat is the difference between the cp mv ln etc in /usr/sbin/static
and cp mv ln functions in /usr/bin (4 Replies)
Discussion started by: DPAI
4 Replies