Search Results

Search: Posts Made By: firestar
2,313
Posted By bartus11
If you have all the lines in @array:print...
If you have all the lines in @array:print @array[7..$#array];
2,125
Posted By Corona688
I don't think you can do that in an alias. ...
I don't think you can do that in an alias.

Even a fairly old ksh should have functions, though:

$ function asdf
{
echo $1
}
$ asdf qwerty
qwerty
$
4,584
Posted By methyl
It is correct. See "man date". As you...
It is correct. See "man date".



As you noticed, Sunday is day zero in cron ... but day seven in "date +%u".
Just for interest "date +%w" gives the Weekday numbered the same way as cron.

Ps....
4,584
Posted By tukuyomi
date +%u returns the number of the day in the...
date +%u returns the number of the day in the current week. (1 is monday, 2 is tuesday, ...)
You can write something like :if [ $(date +%u) -lt 6 ]; then
echo 'command to execute'
fito get the...
1,582
Posted By Scott
0 6,8,10,12,14,16,18 * * 1-5 /monitor.sh ...
0 6,8,10,12,14,16,18 * * 1-5 /monitor.sh


crontab(1) (https://www.unix.com/man-page/OpenSolaris/0/crontab/)
1,856
Posted By michaelrozar17
to replace at the 49th field/occurence of pipe...
to replace at the 49th field/occurence of pipe symbol ( | )
sed 's/|/|||/49' inputfile
1,856
Posted By jlliagre
sed 's/'$(for i in $(seq 1 49); do printf "%s"...
sed 's/'$(for i in $(seq 1 49); do printf "%s" '[^|]*|'; done)'/&|||/'
1,743
Posted By john1212
#!/bin/bash while ( true ) do ...
#!/bin/bash
while ( true )
do
RequiredTime=06:00:00
SysTime=`echo $(date) | awk '{print $4}'`
if [[ $RequiredTime == $SysTime ]]; then
body of script
sleep 1
fi...
48,055
Posted By zaxxon
nl file| more ---------- Post updated at...
nl file| more


---------- Post updated at 04:55 PM ---------- Previous update was at 04:37 PM ----------

If you are a vi-user you can also do:

:set number
# to turn them off
:set nonumber
21,707
Posted By Scott
Hi. It would work if you removed the spaces...
Hi.

It would work if you removed the spaces around the =


var=`echo $!`
echo $var


But you could just say:

var=$!
1,412
Posted By Scott
Hi. You could always just remove the v...
Hi.

You could always just remove the v option from the tar command?
Forum: Solaris 07-21-2010
19,167
Posted By zaxxon
I guess the command id <username> is available on...
I guess the command id <username> is available on every Unix/Linux.
Using more on a file to pipe it into grep is no good usage. grep takes filenames as parameter directly. Also is more for page wise...
Forum: Solaris 07-21-2010
19,167
Posted By Scott
finger is also available on Solaris. Also...
finger is also available on Solaris.

Also getent should be available.
8,329
Posted By Scott
Hi. Try: . ~user1/myenv (make...
Hi.

Try:


. ~user1/myenv

(make sure also that the user1 home directory is accessible to the other users)
8,329
Posted By zaxxon
Place 1 file (for example myenv) which contains...
Place 1 file (for example myenv) which contains those 50 aliases where it can be reached from every of your 12 accounts and add the following line to every of those 12 .profiles

. ./myenv

...
Showing results 1 to 15 of 15

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