9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
In Bash shell - the ps -ef shows only the /bin/bash but the script name is not displayed ? Is there any way to get the script names for the process command ?
--- Post updated at 08:39 AM ---
in KSH (Korn Shell), my command output shows the script names but when run in the Bash Shell... (3 Replies)
Discussion started by: i4ismail
3 Replies
2. Shell Programming and Scripting
So I'm trying to pass certain json elements as env vars and use them later on in a script.
Sample json:
JSON='{
"Element1": "file-123456",
"Element2": "Name, of, company written in, a very weird way",
"Element3": "path/to/some/file.txt",
}'
(part of the) script:
for s... (5 Replies)
Discussion started by: da1
5 Replies
3. Shell Programming and Scripting
i need shell script to add to numbers
#!/usr/bin/sh
a=1310601600 ------> epcho time of Thu, 14 Jul 2011 00:00:00 UTC
b=864000 -------> 10 days in sec
c=`expr $a+$b`
echo $c----1311465600> this output i will use this value to delete the data from MySQL db
next i need to set... (3 Replies)
Discussion started by: sreedhargouda
3 Replies
4. Shell Programming and Scripting
Hi guys/gals i have a quick question. I am trying to read from a file and add the values up but the problem is the values are not integers their floats so i tried to used bc but failed epicly lol. Any tips would be great. Thanks
this is the code i have so far :
while read num
do
... (6 Replies)
Discussion started by: vb615
6 Replies
5. UNIX for Dummies Questions & Answers
How do i tell my bash shell script to test the output of the command i'm using?? I want this script to look for lines not equal to 1 then let me know..
$ cat blah ; echo ---- ; cat blah.sh
1 fe
1 fi
1 fo
0 fum
1 blahda
1 blah
0 blahh
1 bla
1 bl
1 blahhh
----
#!/bin/bash
while... (1 Reply)
Discussion started by: phpfreak
1 Replies
6. Shell Programming and Scripting
Hi Everyone,
How to use catch, try and final in bash script?
what is (SQLException e) and (IOException e), who to conver this 2 function to bash script?
Thank you (8 Replies)
Discussion started by: ryanW
8 Replies
7. Shell Programming and Scripting
I can run this from the command line:
scp -i identfile /path/file_to_send remotelogin@remotebox:/path_to_put_it/file_to_send
and I get:
file_to_send 100% |***************************************************************************| 0 00:00
but if I do:
scp -i identfile... (6 Replies)
Discussion started by: NewSolarisAdmin
6 Replies
8. UNIX for Dummies Questions & Answers
I have to create un counter and I am unable to do an additition:
#!/bin/sh
count=$1
while ]
do
echo $count
$count=$count+$1
done (1 Reply)
Discussion started by: cfg
1 Replies
9. Shell Programming and Scripting
Hi There,
I am having two output files having the following information:
Output1:
Name1 0
Name2 222
Name3 598
Name4 9800
Output2:
Name1 10
Name2 333
Name3 567
Name4 39003
as you can see the two output files have the same Name colom but different records for each name. Now, how... (4 Replies)
Discussion started by: charbel
4 Replies