Search Results

Search: Posts Made By: Goldorakk
3,319
Posted By Goldorakk
Ok !
Thank you very much ! :b:

On AIX the -d option don't work. I will use the Perl command.
3,319
Posted By Goldorakk
Need the date now + 15min
Hello all,

How can I get a timestamp with 15 min more than current time ?
I want to get it like YYYYMMDD-HHMMSS

Thank you for your answers :b:

Regards
3,413
Posted By Goldorakk
$ cat info.txt Major=1 Minor=2 Sub=3 ...
$ cat info.txt
Major=1
Minor=2
Sub=3
Path=4
$ . ./info.txt
$ echo $Major.$Minor.$Sub.$Path
1.2.3.4
$
2,118
Posted By Goldorakk
In Korn Shell: #!/bin/ksh if [ ! $# -eq 2...
In Korn Shell:
#!/bin/ksh

if [ ! $# -eq 2 ]
then
echo "Usage: $(basename $0) <filename> <target directory>"
exit 1
fi

fname=$(basename $1)
current=$(pwd)

cd $2
...
9,172
Posted By Goldorakk
The "command not found" is a problem with bin/csh...
The "command not found" is a problem with bin/csh vs /bin/csh ...
This is the subject, so I just answered on the subject ...
5,220
Posted By Goldorakk
It's very difficult in script shell to manipulate...
It's very difficult in script shell to manipulate line with spaces ... Try this code and launch it like : ./myscript infile outfile

Assume value 441/442 on positions 116 and 130.
If some lines...
2,840
Posted By Goldorakk
Check for your errors yourself ... :D ...
Check for your errors yourself ... :D

#!/bin/csh
# This script will accept a file name as one argument and the word
# read, write or execute as the second argument
# On top of that, it will...
1,580
Posted By Goldorakk
Try this: heading=`sed -e 's/$/<br \/>/' file2...
Try this:
heading=`sed -e 's/$/<br \/>/' file2 > /tmp/file2.$$ ; cat /tmp/file2.$$ ; \rm -f /tmp/file2.$$`
para=`sed -e 's/$/<br \/>/' file3 > /tmp/file3.$$ ; cat /tmp/file3.$$ ; \rm -f...
9,172
Posted By Goldorakk
#!bin/csh -> #!/bin/csh ??? :D After, I...
#!bin/csh -> #!/bin/csh ??? :D

After, I don't like csh so ...
3,825
Posted By Goldorakk
Use the GNU utilities for Win32...
Use the GNU utilities for Win32 (http://unxutils.sourceforge.net/)
You'll find head.exe, ls.exe, ... :eek:
108,160
Posted By Goldorakk
If you have the "rev" command, use gppcj...
If you have the "rev" command, use gppcj solution.
Otherwise, use awk, because with cut, you must know the number of fields to get the last one.
If the delimiter is a / you can use "basename"...
2,636
Posted By Goldorakk
who -q | wc -w
who -q | wc -w
7,484
Posted By Goldorakk
#!/bin/ksh while read line do ...
#!/bin/ksh

while read line
do
echo $line | cut -c1-10 | sed -e 's/\// /g' | read D M Y
echo $Y/$M/$D$(echo $line | cut -c11-)

done < infile
3,629
Posted By Goldorakk
-d Delete all occurrences of input characters...
-d Delete all occurrences of input characters that are specified
-s Replace instances of repeated characters with a single character

Delete vs replace by a single char.

Did you try "-ds"...
8,617
Posted By Goldorakk
Is there any data in ~/builds/scripts/at-job.log...
Is there any data in ~/builds/scripts/at-job.log ???
2,636
Posted By Goldorakk
who | cut -f1 -d' ' | sort | uniq
who | cut -f1 -d' ' | sort | uniq
4,886
Posted By Goldorakk
Replace $NF by your column number : awk...
Replace $NF by your column number :
awk '{$2=NR}{print}' infile
ATOM 1 N PRO A 15
ATOM 2 CD PRO A 15
ATOM 3 HD1 PRO A 15
ATOM 4 HD2 PRO A 15
ATOM 5 CA PRO A 15
ATOM 6 HA PRO A 15
ATOM 7 CB...
2,191
Posted By Goldorakk
Well, before you ask for the "0" case ... :D : ...
Well, before you ask for the "0" case ... :D :
read x

while read line
do
echo $line | read a b c d

if [ "$a" = "$x" ] || [ "$x" = "0" ]
then
( IFS=-
printf ' 1\n 20\n 0\n 0\n 1\n 1\n 7\n...
2,191
Posted By Goldorakk
Sorry, I didn't see this -second- bug ... ;) ...
Sorry, I didn't see this -second- bug ... ;)
while read line
do
echo $line | read a b c d

if [ "$a" = "$x" ]
then

Result:
Please enter the Test Day or 0 for all days:
1
X is now equals...
2,191
Posted By Goldorakk
Try this: while read line do echo $line |...
Try this:
while read line
do
echo $line | read a b c d
10,818
Posted By Goldorakk
Usage: java [-options] class [args...] ...
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
18,681
Posted By Goldorakk
Using xpg4' sed on Solaris with "sed...
Using xpg4' sed on Solaris with "sed 's/[[:space:]]\{2,\}\|//g'" gives for me
a bsa df32323
sf saafs sdf4333
a b cadfsa dsf23 32|23
Must use "sed 's/[[:space:]]\{2,\}\|/|/g'" (just add | before...
10,271
Posted By Goldorakk
My command work under Solaris. I think you are...
My command work under Solaris. I think you are under Mandriva 2009 ?
So, the recursive option of the 'rm' command is '-R' and not '-r'.
10,271
Posted By Goldorakk
Try this:$ find /path/to/data/* -name data -type...
Try this:$ find /path/to/data/* -name data -type d -ctime 0 -exec rm -rf {} \;:D
2,686
Posted By Goldorakk
Hummmm ... you translate "/" in "\n" and after...
Hummmm ... you translate "/" in "\n" and after you want to "cut" with the "/" as delimiter ... :rolleyes:

Try this :$ path=/first/second/third/fourth
$ var=$(dirname $path)
$ echo $var...
Showing results 1 to 25 of 43

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