9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Gurus,
I am a little bit confused by the sed command.
my file is below
cat sample
aaa
bbb
ccc
ddd
eee
fff
ggg
hhh
iii
below is command and output. (6 Replies)
Discussion started by: ken6503
6 Replies
2. 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 Replies
3. Shell Programming and Scripting
Hello,
I have written a command n shell script :
srvctl relocate service -d t1 -s s1 -i i1 -t t1 -f
If the above command executes successfully without error I need to echo
"Service relocated successfully
and If it errors out I need to trap the errors in a file and also need to make... (1 Reply)
Discussion started by: Vishal_dba
1 Replies
4. Shell Programming and Scripting
How do i echo the output of a unix command using shell script???
Like:
echo /etc/ ls -l (2 Replies)
Discussion started by: sunny2802
2 Replies
5. UNIX for Dummies Questions & Answers
HI, guys, I am having some problem with the echo command, so I want to echo some text to a file name loginFile, the result inside the loginFile should looks like:
expect ">"
so what I did is:
echo "expect "">""" >> $loginFile
but it just gave out:
expect >
The thing is I still need... (2 Replies)
Discussion started by: warmboy610
2 Replies
6. 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
4 Replies
7. Shell Programming and Scripting
echo "abc 123" | sed 's/*/& &/g'
output:
a b c 123 123
Why there are spaces between the "abc" letters?
echo "abc 123" | sed 's/*/&&/'
output:
abc 123
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
3 Replies
8. Shell Programming and Scripting
Hi guys,
So my code is below. This is a simplified version of the shell... It does not continue for ever... I guess its actually rather a program to accept a command.. has the fork and the execve etc. Anyways when i compile it and run it in the terminal for some reason only '/bin/echo "enter... (1 Reply)
Discussion started by: 1bh
1 Replies
9. Shell Programming and Scripting
Probably my first post, very new to shell scripting :)
Here is the script i am trying to modify to use function
# Script to create simple menus and take action according to that selected
# menu item
#
while :
do
clear
echo "-------------------------------------"
echo "... (2 Replies)
Discussion started by: replyramdas
2 Replies