10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello
i am trying to do some calculation from output command
for example
ls -l
if
then
echo "error"
else
echo "$"
fi
its something like this
which get strings from output command and try to sum total lines of this string if exceed certain number it display error
if not it... (3 Replies)
Discussion started by: mogabr
3 Replies
2. Shell Programming and Scripting
Can i do this
Say one command
sed 's/:*/ /g' $summf
is returning
C1234
C2345
C3434
some no of rows, now this ouput i have to insert it into a DB table
how do i do this?? (2 Replies)
Discussion started by: depakjan
2 Replies
3. Shell Programming and Scripting
Hi,
I try to write script and echo two command at the same line .
echo "A"
echo "B"
How can I pipe above two command at the same line in text file .
So, in the output text file , you can see below ???
A B
not
A
B
Any sugggestion ??? (4 Replies)
Discussion started by: chuikingman
4 Replies
4. Shell Programming and Scripting
Hello team,
I am running below command which is giving following output.
bash-3.00$ ps -eo pid,pcpu,args | sort +1n | grep -i java
12 0.0 grep -i java
8804 0.0 /opt/app/ccr/home/ccr/WebSphere/AppServer/java/bin/sparcv9/java -XX:+UnlockDiag
9241 0.0... (7 Replies)
Discussion started by: coolguyamy
7 Replies
5. Shell Programming and Scripting
I have written shell script to send file as an attachemt of email and output of "top -o res" command as email body. it works fine if i execute manually from prompt but it does not send "top -o res" command output in email body when it is executed via crontab. Any suggestions. My script is below:... (5 Replies)
Discussion started by: needyourhelp10
5 Replies
6. Shell Programming and Scripting
Hi Guys,
I have a script for which the stdout and stderr should be redirected to a log file, they should not be printed on the screen. Could you please let me know the procedure to redirect the output of the script to a log file. Thanks in advance.
--- Aditya (5 Replies)
Discussion started by: chaditya
5 Replies
7. Shell Programming and Scripting
Hello,
I'm writing some bash scripts and I'm trying to get an echo command and the output of another command to display on the same line. For example:
I want to run
echo "Operating System: " unameand have it displayed as
Operating System: Darwin
Thanks for your help! (7 Replies)
Discussion started by: codyhazelwood
7 Replies
8. Shell Programming and Scripting
Hello, in a script i would like to evaluate a command output with a grep, for example, to know if the parameter defined by the user is in the output.
Something like: the_command | grep $1
Please, how is the way to evalulate in this a script, like
if
echo "incorrect parameter, not in... (2 Replies)
Discussion started by: aristegui
2 Replies
9. Shell Programming and Scripting
Hi List,
How to read the output of a command executed from a script.
For ex.
sample_scritp.sh
-------------
useradd testuser1
password testuser1
....
.....
--------------
This prompts for "password", and "confirm password", for which i need to give the values from script.
Can... (4 Replies)
Discussion started by: sri b
4 Replies
10. Shell Programming and Scripting
I am trying to check to see if a file exists on a ftp server, well, I know that cant be done, atleast directly, So I came up with this small script
ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
cd public_html/crap
dir $FILE
quit
END_SCRIPT
Where the $ variable... (2 Replies)
Discussion started by: designflaw
2 Replies