Hi all,
I wanted to know how you can avoid problems when reading from stdin, when the file name is like:
./mydir/my resume
This is interpedet by the shell as two files and my shell script outputs an error message.
I tried several differnt ways, such as:
"'$myVariable'"...
After posting my code, I saw what was wrong... I messed up with the trap call, I should have instead called the trap 'gotill' with the "INT" signal.
Problem solved...
I have defined the following trap function.
gotill()
{
job=$(jobs)
bg=$(echo "$job" | grep "status &$")
if [ ! -z "$bg" ]; then
trap '' INT
else
echo "Warning, the next interrupt key (^C) will terminate the script!"...
I need to find the size of a file and or a directory in 1k disk blocks.
A normal ls -l | cut -d' ' -f5 respectively ls -ld give me the size in bytes. Is there another way to find it in 1k disk blocks or do I have to multiply it with some numbers ?
Thanks for your help.
I tried all this, removing the ":" and the space charcters, still the same error message. Same thing happens with getopt.
Any other suggestions ?
Thanks!
I am running the GNU bash, version 2.05b.0(1)-release (i386-redhat-linux-gnu) Copyright (C) 2002 Free Software Foundation, Inc.
I tried to use the getopts function in my script. However, I always get the following error message:
./status: line 109: syntax error near unexpected token `;;'...
windows 98 wont load it just freezes midway, same thing happens when i try booting in safe mode
dos seemed to be working so but now it locks up b4 i get to the command prompt
any ideas on what i can do?
i cant reformat due to important files on the hd, i just need to move the files from...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.