10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a script called script.sh that has the following in it.
cat /home/auto/script.sh
#!/bin/bash
ARGA=$1
if ; then
echo "${ARGA}:Confirmed"
else
echo "${ARGA}:Unconfirmed"
fi
I need a way to run this script, and then, after script has confirmed the... (9 Replies)
Discussion started by: SkySmart
9 Replies
2. Shell Programming and Scripting
Dear All,
I have a question that's been difficult to get an answer to.
I often write command line loops, e.g. find files, print name, grep for term, apply sed, etc
I use both zsh and bash.
When I write a loop e.g.
for line in `more myfile.txt`
> do
> echo $line
> done
but... (2 Replies)
Discussion started by: JohnK1
2 Replies
3. Shell Programming and Scripting
I am looking to do a ls on a folder and have the output of the ls be structured so that is is modificaiton date, file name with the date in a format that is compatible with mysql. I am trying to build a table that stores the last modification date of certain files so I can display it on some web... (4 Replies)
Discussion started by: personalt
4 Replies
4. Red Hat
Dear Madam/Sir
Who can help me with writing a script doing the following?
1- Read names of files (only files with special name format let say initially they have the same file name start like TT*)
2- Then create an empty files with the same names have been read in step one but with extension... (1 Reply)
Discussion started by: m.nageeb
1 Replies
5. Shell Programming and Scripting
cmd='date | wc' or cmd="date | wc"
$cmdIf this script is executed, an error is generated. The reason written was that "The execution fails because the pipe is not expanded and is passed to date as an argument". What is meant by expansion of pipe. When we execute date | wc on the command line, it... (2 Replies)
Discussion started by: daudiam
2 Replies
6. OS X (Apple)
I developed a script in Lingon (which is an automated script editor developed for OS X) that is used to automatically restart programs only if they crash. The script itself does just that, but I only want it to load if I'm going to use the specific application that it's designed to protect. In the... (2 Replies)
Discussion started by: JFraser1
2 Replies
7. Shell Programming and Scripting
I developed a script in Lingon (which is an automated script editor developed for OS X) that is used to automatically restart programs only if they crash. The script itself does just that, but I only want it to load if I'm going to use the specific application that it's designed to protect. In... (3 Replies)
Discussion started by: JFraser1
3 Replies
8. Shell Programming and Scripting
Hi,
Is it possible to accept a filename as command line parameter and then write to that file using command redirection? i tried the below script.
outputfile=`echo $1`
echo "Writing to file" > 'echo $outputfile'
exit $returncode
but it isnt working. is there any other way to... (9 Replies)
Discussion started by: silas.john
9 Replies
9. Programming
Hello All;
I am going to write an application in C/C++ which has so many source files and hence created
many subdirectories. My area of concern is to write makefile. What i thought that each
subdirectory would have own makefile and wanted to have one parent makefile which will call all ... (3 Replies)
Discussion started by: nikhildot
3 Replies
10. Programming
Hi
I am very new to Linux programming,otherwise I have exposure to Linux. Was thinking about something like writing my own commands for Linux. Any ideas where to start, any useful links and what I need to know before I start with this.
Thanks :)
Sidhu (3 Replies)
Discussion started by: Amardeep
3 Replies