11-04-2016
Sorry, I don't understand. Do you mean print the variables in the line directly preceeding the if-condition?
---------- Post updated at 03:42 PM ---------- Previous update was at 03:34 PM ----------
Well, it was the working directory.
Adding "cd /home/pi" solved it. But I was using absolute paths, could anybody explain what was wrong with that?
And thank you guys! That was really kind, I appreciate your help. Hope I can give sth in return some day.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
How can i dynamically read files names from a list file and execute them from a single shell script.
Please help its urgent
Thanks in Advance (4 Replies)
Discussion started by: anushilrai
4 Replies
2. Shell Programming and Scripting
hi,
can i run a shell script as a daemon ?
the shell script looks like this :
can this be run as a service ?:
thanks
regards
shann (1 Reply)
Discussion started by: massoo
1 Replies
3. Shell Programming and Scripting
I have simple shell script that I run as cron job every hour of the day. I would like to make it a daemon that runs far more frequently like every 30 seconds or so, but I have never made daemon before. How can I do this?
-Sam (7 Replies)
Discussion started by: Sammy_T
7 Replies
4. UNIX for Dummies Questions & Answers
Hello Everybody
I have a shell script file which contains certain intialisation.Initialisation section is around 20 lines.This initialisation section is required by 20 shell script files.
Intialisation shell script contains only initialisation of variables and it is not a good practise to... (2 Replies)
Discussion started by: appleforme1415
2 Replies
5. Shell Programming and Scripting
Colleagues,
i have an jsp application which uses a servlet for controlling the request. the servlet uses a java class that will invoke a shell script. when i involked a shell script using java's runtime.exec command , it didnt work...
applications used are tomcat5, Fedora 6 and java1.5.0_09... (1 Reply)
Discussion started by: jaganadh
1 Replies
6. Shell Programming and Scripting
Hi,
Please help me out.
I have around 700 sql files to execute in a defined order, how can i do it from shell script (3 Replies)
Discussion started by: anushilrai
3 Replies
7. Shell Programming and Scripting
Hi all,
I am getting : No such file or directory while executing a shell script. But i have that corresponding file in the corresponding path. It also have executable rights. Please help me out in this
Thanks in advance.
Ananthi.U (7 Replies)
Discussion started by: ananthi_ku
7 Replies
8. Shell Programming and Scripting
Say i have a simple example:
root@server # cat /root/scripts/test.sh
while sleep 5
do
echo "how are u mate" >> /root/scripts/test.log
done
root@server #
Instead of using rc.local to start or another script to check status, I would like make it as daemon, where i can do the following:
... (2 Replies)
Discussion started by: timmywong
2 Replies
9. Shell Programming and Scripting
I need to write something that will read and execute all the files(Mainly executable scripts) inside one or more folders; in other words, a continuous chain with a break when finished. I'm new to shell and need syntax help. I'm on Ubuntu 12.10-Gnome btw.
Here are some main highlights I think... (2 Replies)
Discussion started by: linuxlololol
2 Replies
10. Shell Programming and Scripting
I'm trying to use a shell script to compile and execute a java file. The java classes are using sockets, so there is a client.java file and a server.java file, each with their own shell script. I also want to handle the command line arguments within the shell script, not the java classes. The... (1 Reply)
Discussion started by: britty4
1 Replies
HEAD(1) FSF HEAD(1)
NAME
head - output the first part of files
SYNOPSIS
head [OPTION]... [FILE]...
DESCRIPTION
Print first 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name. With no
FILE, or when FILE is -, read standard input.
Mandatory arguments to long options are mandatory for short options too.
-c, --bytes=SIZE
print first SIZE bytes
-n, --lines=NUMBER
print first NUMBER lines instead of first 10
-q, --quiet, --silent
never print headers giving file names
-v, --verbose
always print headers giving file names
--help display this help and exit
--version
output version information and exit
SIZE may have a multiplier suffix: b for 512, k for 1K, m for 1 Meg.
AUTHOR
Written by David MacKenzie.
REPORTING BUGS
Report bugs to <bug-coreutils@gnu.org>.
COPYRIGHT
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO
The full documentation for head is maintained as a Texinfo manual. If the info and head programs are properly installed at your site, the
command
info head
should give you access to the complete manual.
head (coreutils) 4.5.3 February 2003 HEAD(1)