Search Results

Search: Posts Made By: grahamb
14
fi
9,478
Posted By grahamb
// is not comment marker
Hi
I used # in line 20, thus:
fi # //LINE 20<<
That works!
Graham
Forum: Programming 07-27-2008
3,210
Posted By grahamb
gcc does not include certain .h-files
Hi there!

gcc seems not to include available files, see below:

What should I do?

Look forward to your reply/replies!
Thanks
Grahamb

In the source directory I enter:
#gcc -Wall...
13,183
Posted By grahamb
Solved!
Thanks vgersh99 !
I would never have dreamt to use the sed string with out the single quotes. Well it worked;

thank you :D
GrahamB
13,183
Posted By grahamb
"sed -n expression " fails. Why?
Hi Everyone!

I am trying to extract records between date makers in a log file. My selection string doesn't work, though. Please help.

This test works, if I manually enter the two date-strings...
8,849
Posted By grahamb
That dammed substitution!
Hi You Guys!

I'm sure most of you have an answer to this one. :p I'm trying to do a work around on the problem above, but get held up elsewhere!!!!! :eek: So can't avoid this problem.
...
3,195
Posted By grahamb
Hi To get rid of the spaces then add: ..... ...
Hi
To get rid of the spaces then add:
..... | sed 's/ //g'
echo "01 B D A C" | fold -2 |sort -b|xargs echo | sed 's/ //g'

Regards
GrahamB
6,023
Posted By grahamb
Output from crontab
Hi Satish:

Your last question: how can we capture the output of the cronjob.

Use the directional parameters "> $file" and/or ">> $file" for example. Anything that goes to stdout would then be...
6,023
Posted By grahamb
Creating crontab! files! Who runs crontab?
Hi

If you want a specific user to run a crontab (root, myself, yourself, etc) then the easy way is to log into that users account and create the crontab entry:
"crontab -e"
This gives you YOUR...
22,793
Posted By grahamb
Running sliently - not interactively
Hi!

Try this idea;

If a script needs to test whether it is running in an interactive shell, it is simply a matter of finding whether the prompt variable, $PS1 is set. (If the user is being...
2,563
Posted By grahamb
Testing a range of values
Hi again djt !!

Try this one, this idea addresses the RH-side of the equation, namely: ranges of values:
read character
case $character in
# Check for letters
[a-z] | [A-Z] )...
2,563
Posted By grahamb
LHS of "if" must be quoted.
Hi djt !

One of the reasons why your script does not work is that the left side MUST be in quotes, eg:
if [ "$number" = "1" ]; then
echo "Number equals 1"
else
echo "Number does not...
5,925
Posted By grahamb
Care: There are three time stamps on each file.
Hi Shyam!

As blowtorch says:
1) to remove and place in another directory: use "mv"
2) to copy and preseve the creation time: use cp -p <from> <to>

But you need to understand the different...
77,499
Posted By grahamb
Including .profile: an example
Hi

Here is a line from my crontab:
10 4 * * * . ~/.profile; ${SCRIPTS}/backup_mysql.sh >> ${BACKUPS_LOG}/${HOSTNAME}_mysql_v${VERS}.script.log 2>&1
Assume each crontab command line generates a...
8,849
Posted By grahamb
find: problems escaping printf-command string
Hi Folks!

Can you help me with this find -printf command. I seem to be unable to execute the printf-command from my shell script. I'm confused: :confused:

My shell script snippet looks like...
Showing results 1 to 14 of 14

 
All times are GMT -4. The time now is 02:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy