10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi,
i'm trying to write a tcsh script that reads in a text file (one column) and the runs a different command for each line of text.
i've found lots of example commands for bash, but not for tcsh.
can anyone give me a hint?
thanks,
jill (8 Replies)
Discussion started by: giuinha
8 Replies
2. Shell Programming and Scripting
I'm looking to write a script that takes a .txt filename as an argument, reads the file line by line, and passes each line to a command. For example, it runs command --option "LINE 1", then command --option "LINE 2", etc. I am fetching object files from a library file, I have all the object file... (2 Replies)
Discussion started by: Paul Martins
2 Replies
3. Shell Programming and Scripting
myenv.sh script sets LOG_DIR variable.
I can run the script and echo the variable in a single line as:
# First set LOG_DIR to some dummy 'NONE' value
$ export LOG_DIR="NONE"
$ echo ${LOG_DIR}
NONE
$ cat /tmp/bin/myenv.sh
export LOG_DIR="/tmp/log"
#The below command doesn't show the... (2 Replies)
Discussion started by: ysrini
2 Replies
4. UNIX for Dummies Questions & Answers
I have a script (ksh) that has permissions 775 and owned by root.system. This script takes the parameter of a full file name and chmods the file to 666 and changes ownership to user smith.staff.
ex: modify_file.ksh /home/smith/filea
modify_file.ksh has 775 and root.system ownership.
The... (1 Reply)
Discussion started by: mlacriola
1 Replies
5. UNIX for Dummies Questions & Answers
Normally i would do this-
cd abc
ls -ltr
I wish to run above command in a single line, like this-
cd abc | ls -ltr
But above command doesn't works, it simply runs the second command, ignoring the 1st one.
:confused: (4 Replies)
Discussion started by: boy18nj
4 Replies
6. Shell Programming and Scripting
Hi. I'm trying to write a script that reads a line on a file and runs a different command for a different line output.
For example, if it finds the word "Kuku" on the line it sends mail to Kuku@kuku.com. Otherwise, it sends mail to Lulu@lulu.com.
TIA. (2 Replies)
Discussion started by: Doojek9
2 Replies
7. Shell Programming and Scripting
Hi everyone,
when executing this command in unix:
echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error.
here is content of my script:
tdbsrvr$ vi hc.sh
"hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies
8. Shell Programming and Scripting
Hello,
I am trying to learn how to pass something more than a one-command startup for gnome-terminal.
I will give an example of what I'm trying to do here:
#! /bin/bash
#
#TODO write this for gnome and xterm
USAGE="
______________________________________________
${0##*/}
run... (0 Replies)
Discussion started by: Narnie
0 Replies
9. Shell Programming and Scripting
How would I combine something like:
localserver# ssh remoteserver
remoteserver# find blah blah blah
into a one liner that would ssh to the remote server and run the find command, so I could put it in a script to automatically go out and run things on remote servers with out needed user... (2 Replies)
Discussion started by: LordJezo
2 Replies
10. UNIX for Dummies Questions & Answers
I am having to do a lot of searching thru files to replace words. Is there a command that i can run that will alow me to hunt thru a group of files and replace one word with another without having to open each file idividually?
-thanks;) (1 Reply)
Discussion started by: dudboy
1 Replies