Search Results

Search: Posts Made By: subway69
1,748
Posted By methyl
First cron: Hourly except at 20:00 . What did...
First cron: Hourly except at 20:00 . What did you intend? I'm assuming that this certain editions of Linux because the syntax is invalid in unix.

Second cron: every 20 mins (On the hour; twenty...
1,748
Posted By 47shailesh
sorry bad post
sorry bad post
1,200
Posted By neutronscott
You mean image-thumb.jpg rather than...
You mean image-thumb.jpg rather than image.jpg-thumb? You first have to strip the extension off, then back on again.


jpegtopnm "$img" | pnmscale -height 200 | pnmtojpeg >...
1,200
Posted By Corona688
You can remove the 'shift', it does nothing...
You can remove the 'shift', it does nothing there.

Does this code do what you want, or do you still have questions?
1,595
Posted By vgersh99
not tested.... #!/bin/sh while : do ...
not tested....

#!/bin/sh
while :
do
echo 'Please enter a car model: '
read model
awk '$2 ~ m {print $1, $2, $3, $4; _e=1}END{exit _e}' m="${model}" /home/cars/
if [...
1,595
Posted By vgersh99
awk '$2 ~ m {print $1, $2, $3, $4}' m="${model}"...
awk '$2 ~ m {print $1, $2, $3, $4}' m="${model}" /home/cars/
29,611
Posted By neutronscott
I just tried and it takes GET arguments, -d will...
I just tried and it takes GET arguments, -d will POST data.


curl "https://api-ssl.bitly.com/v3/shorten/?login=<user>&apiKey=<key>&format=txt&longUrl=$url"
works for me.

Also you said it...
1,445
Posted By methyl
Similar to Corona688, but retaining and revising...
Similar to Corona688, but retaining and revising the question.

#/bin/sh
echo "Please enter the name of a subdirectory under /home/other"
read dir
if [ -d "/home/other/${dir}" ]
then
ls...
1,445
Posted By Corona688
grep matches strings inside files, not names of...
grep matches strings inside files, not names of directories inside other directories.

You don't have to do something
if [ $? -eq 0 ]
then by the way, you can just do
if something
then
...
809
Posted By Yoda
if [ `last | grep $1 | wc -l` -eq 0 ] then ...
if [ `last | grep $1 | wc -l` -eq 0 ]
then
echo "$1 is not online and has never logged in."
else
echo "$1 has been online since `last | grep $1 | tail -1 | awk ' { print $3 " " $4 } '`"
fi
2,409
Posted By pandeesh
if you want to filter out the last time alone...
if you want to filter out the last time alone then use:
last |head -1
pandeeswaran@ubuntu:~$ last |head -1
pandeesw pts/0 :0 Mon Jan 16 13:13 still logged in
2,409
Posted By vbe
Yes last command, look at the man pages!
Yes last command, look at the man pages!
2,505
Posted By frank_rizzo
even more streamlined. if who|grep -qw...
even more streamlined.

if who|grep -qw ^$user >/dev/null 2>&1
then
echo "$user is online"
else
echo "$user not online"
fi

or the one line version.

who|grep -qw ^$user && echo "$user...
2,505
Posted By ahamed101
who | grep -w ^$user >/dev/null 2>&1 if [ $?...
who | grep -w ^$user >/dev/null 2>&1
if [ $? -eq 0 ]
then
echo "$user is online"
else
echo "$user not online"
fi


if your grep supports -q option, use it like this who | grep -qw...
Showing results 1 to 14 of 14

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