9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How do I assign output of a command to a variable without expanding it?
I have tried every combination of quoting I can think of including literal quotes in the command and user agent variable and still can't get it to work (or it breaks Lynx because Lynx tolorates spaces in the useragent but... (2 Replies)
Discussion started by: Michael Stora
2. UNIX for Dummies Questions & Answers
I'm relatively new to Unix scripting and am trying to get my head around piping.
I'm trying to take a header record from one file and prepend it to another file. I've done this by creating several temp files but i'm wondering if there is a cleaner way to do this.
I'm thinking... (10 Replies)
Discussion started by: BigCroyd
3. 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
4. UNIX for Dummies Questions & Answers
Yes I know this is a bad use of cat, but just ignore it please :P
My problem is with sed.
File: "newFile" contains:
Command I run:
cat newFile | sed 's/day/night'
sed: -e expression #1, char 11: unterminated `s' command
Why??? (1 Reply)
Discussion started by: maximus73
5. UNIX for Dummies Questions & Answers
First post here, so hopefully all guidelines are followed, and thanks in advance for any replies.
I'm working on a shell script(BASH) that processes a csv file and performs various tasks with the data. All is well, except I want to use 'tee' to send output from 'wc' to a file as well as pipe it... (4 Replies)
Discussion started by: jazzmusic
6. Shell Programming and Scripting
echo "abc 123" | sed 's/*/& &/g'
a b c 123 123
Why there are spaces between the "abc" letters?
echo "abc 123" | sed 's/*/&&/'
Why the regex in the above script does not match anything? I thought * should match 123 in any case.
---------- Post updated at 08:25... (3 Replies)
Discussion started by: kevintse
7. Shell Programming and Scripting
Okay, title is kind of confusion, but basically, I have a lot of scripts on a server that I need to replace a ps command, however, the new ps command I'm trying to replace the current one with pipes to sed at one point. So now I am attempting to create another script that replaces that line.
... (1 Reply)
Discussion started by: cbo0485
Kindly consider following :
login as: root
Using keyboard-interactive authentication.
Last login: Mon Nov 3 19:30:50 2008 from xxxxxxxxxxx
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
You have new mail.
... (3 Replies)
Discussion started by: Reboot
9. Shell Programming and Scripting
I have this complicated code that output value in between pattern and add "a string" to the front of the output.
The problems I have many pattern that are the same.
so I want to know how to get the value between 1st pattern, 2nd pattern etc.
sed -n... (14 Replies)
Discussion started by: minifish