10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have bash shell script which is internally calling python script.I would like to know how long python is taking to execute.I am not allowed to do changes in python script.Please note i need to know execution time of python script which is getting executed inside shell .I need to store execution... (2 Replies)
Discussion started by: Adfire
2 Replies
2. Shell Programming and Scripting
Hi,
I would like to run following code in bash inside a zsh script. (In this case is output unfortunately very different if you run it in zsh).
I tried to put "bash" in front of the code but I obtained following error message "bash: do: No such file or directory
" eve though I merged the whole... (7 Replies)
Discussion started by: kamcamonty
7 Replies
3. Shell Programming and Scripting
Hi All,
I am trying to read a file character by character,
#!/bin/bash
while read -n1 char; do
echo -e "$char\c"
done < /home/shak/testprogram/words
Newyork is a very good city.
Newyorkisaverygoodcityforliving
I need to preserve the spaces as thats an... (3 Replies)
Discussion started by: Kingcobra
3 Replies
4. Shell Programming and Scripting
Hi,
I have an input file like this
$ cat infile
hi,i,"am , sam", y
hello ,good, morning
abcd, " ef, gh " ,ij
no, "good,morning", yes, "good , afternoon"
from this file I have to split the fields on basis of comma"," however, I the data present inside double qoutes should be treated as... (3 Replies)
Discussion started by: sam05121988
3 Replies
5. Shell Programming and Scripting
I have a script that test for server up status.
I need to preserve the value of status between every run of the script.
test.sh
log=$(cat /tmp/log_status)
start loop
test for servers
print status for munin
etc
test=$(echo -e "${test}${status},")
end loop
echo $test >... (4 Replies)
Discussion started by: Jotne
4 Replies
6. Shell Programming and Scripting
There's a JavaScript file that I call from command line (there's a framework) like so:
./RunDiag.js param1:'string one here' param2:'string two here'
I have a shell script where I invoke the above command. I can run it in a script as simple as this
#!/bin/bash
stuff="./RunDiag.js... (4 Replies)
Discussion started by: AcerAspirant
4 Replies
7. Shell Programming and Scripting
Can someone help me to write a script / command to read in a file, character by character, replace any unknown ASCII characters with space. then write out the file to a new filename/
Thanks! (1 Reply)
Discussion started by: raghav525
1 Replies
8. UNIX for Advanced & Expert Users
Hi, I have a accentuated letter (ö) in a script for an Installer. It's a file name. This is not working and I'm told to try using the octal value for the extended ascii character. Does anyone no how to do this? If I had the word "filförval", can I just put in the value between the letters, like... (9 Replies)
Discussion started by: peli
9 Replies
9. Shell Programming and Scripting
Hi everyone!
I need some help with my shell script :(
I am sending a shell command from a html text input to a cgi. Then, I store it into a variable. For example
var="ps -axu"
echo `$var`
This functions properly. But consider the following...
var="ps -axu | grep root"
Now, I want... (2 Replies)
Discussion started by: Nene
2 Replies
10. UNIX for Advanced & Expert Users
I need to schedule a shell script that runs at the command prompt to run with crontab. When I run this at the command prompt as follows it works:
echo /usr/test/script.sh date1 date2 y | at 20:00
But if I will pass these argument (date1, date2, Y) with in a shell script (say scr1.sh) and... (7 Replies)
Discussion started by: keerthi
7 Replies