9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am running a script sample.sh in bash environment .In the script i am using sed and awk commands which when executed individually from terminal they are getting executed normally but when i give these sed and awk commands in the script it is giving the below errors :-
./sample.sh: line... (12 Replies)
Discussion started by: satishmallidi
2. Shell Programming and Scripting
How can we empty or replace with null, following block of code (within the php quotes including the quotes) from inside a file.
*** some other data above this code
... (5 Replies)
Discussion started by: fed.linuxgossip
3. Shell Programming and Scripting
I created a shell with sed -i option. It is giving error - No such file or directory
sed -i 's/yes/no' yes.txt
sed -i 's/why/where' yes.txt
sed -i 's/when/how' yes.txt
Error - :No such file or directory
When I run single line in my script say sed -i 's/yes/no' yes.txt... (10 Replies)
Discussion started by: yahoo
4. Shell Programming and Scripting
I use many different machines at work, each with different versions of o/s's and installed applications. Sed in vi is particularly inconvenient in the sense that sometimes it will accept the "\r" as a carriage return, sometimes not. Same thing with "\n". For instance, if I have a list of hosts... (7 Replies)
Discussion started by: MaindotC
5. Shell Programming and Scripting
phx,v3apilw2core,app-usage,05-03-2010, phx,tr(white,wavern), 2,1
I need help with the sed command to remove the text in red from the line above, including braces.
I tried the following two approaches:-
sed '/(/,/)/ !d' test.txt | more
sed "/(/,/)/ !d" test.txt | more (1 Reply)
Discussion started by: smee
6. Shell Programming and Scripting
How do i replace a string using sed into the same file without creating a intermediate file? (7 Replies)
Discussion started by: gomes1333
7. Shell Programming and Scripting
I have been trying for a couple of hours now to use sed to replace a string in a file. The file is delimited by pipes (|) and I have tried writting the script several different ways.
The problem is that when there is a slash prior to a delimiter that it is being kicked out by my DB. So I am... (4 Replies)
Discussion started by: DerangedNick
8. UNIX for Dummies Questions & Answers
I need to delete all files that contain the word thumbs. Those files are spread all throughout sub-directories in a file directory tree.
Is there a script or single line command that will find all files with the word thumbs, and simply delete the file?
Delete... (4 Replies)
Discussion started by: ..Chris..
9. Shell Programming and Scripting
I am writting a shell script program on AIX server version 5.3 in which I am doing cleaningprocess for files in which I am trying to replace ' with ` . and for this I am using following command:
sed -e 's//$/g' -e 's/\\/\//g' -e 's/'/`/g' $file >>... (2 Replies)
Discussion started by: mr_dba01