10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I'm trying to create a shell script that takes a awk script that I wrote and a filename as an argument. I was able to get that done but I'm having trouble figuring out how to keep the header of the output at the top but sort the rest of the rows alphabetically. This is what I have now but it is... (1 Reply)
Discussion started by: Eric7giants
2. Shell Programming and Scripting
I am very new to shell script and I need your help here to write a script. Actually, I have a script abc.sh which don't get terminated itself. So I need to design a script to run this script, save the output to a file, search for a given string in the output and if it exists send those... (11 Replies)
Discussion started by: Sambit Sahu
3. Shell Programming and Scripting
I am writing a bash script that automatically generates a macro program.
I want to have an echo on multiple lines and getting an error
/home/chaos/instru-correct.sh: line 309: command line is: command not found
I am using
echo "# The general synopsis of the $mfl" \
... (2 Replies)
Discussion started by: kristinu
4. Shell Programming and Scripting
I'm trying to copy script output and use it in this same script as a variable, and call the variable when script is compiled.
The script is below.
while read line; do
grep "$line" logfile.txt
# Create text file
echo "From: IT ... (4 Replies)
Discussion started by: SysAdminRialto
5. Shell Programming and Scripting
Hi Team -
I"m very new to Shell Scripting so I have a rather novice question. My forte is Windows Batch Scripting so I was just wondering what the Shell Script equivalent is to the DOS command %~n?
%~n is a DOS variable that dispayed the script name.
For instance (in DOS):
REM... (11 Replies)
Discussion started by: SIMMS7400
6. Shell Programming and Scripting
I am trying to capture logs of the script in the file as well as on the screen. I have used exec and tee command for this. While using exec command I am getting the correct output in the file but, script output is not getting displayed on the screen as it get executed.
Below is my sample... (14 Replies)
Discussion started by: Prathmesh
7. Shell Programming and Scripting
I have a file serverlist in that all host names are placed.
i have written a small script
for i in `cat serverlist`
ping $i >> output.txt
so now it creates a file output.txt till here fine..
now each time i run this script the output file... (4 Replies)
Discussion started by: madhudeva
8. Shell Programming and Scripting
I have a script(sample.sh) displaying the output of "dd" command. Now i am using this script in system() call as,
system("sh sample.sh") in an application file.
I want the output of system("sh sample.sh") in the application file itself.
How can i get it?
Many thnaks.... (9 Replies)
Discussion started by: amio
9. Shell Programming and Scripting
This is my piece of code.
my $logFile = $ARGV;
die "usage: $0 <logFile>" unless $logFile;
die "Logfile $logFile doesn't exist" unless -f "$logFile";
open(my $log, "<", $logFile) or die "Can't open $logFile for reading.";
print "Processing file $logFile...\n";
#my $authenticates... (2 Replies)
Discussion started by: namishtiwari
10. UNIX for Dummies Questions & Answers
Some of my scripts have very long commands that go beyond the horizontal scroll limits of my screen (1024 x 768), even with a very small font. Is there a continuation character (like the option+l "ell") in AppleScript that will let me break up the line?
Right now I just press a hard return to... (2 Replies)
Discussion started by: cassj