Search Results

Search: Posts Made By: Shellslave
1,735
Posted By Shellslave
echo "Some test code here" > filename is the...
echo "Some test code here" > filename

is the simplest of all the commands.
Also $ in sed "s/" is the regex for the end of line. and ^ is the begin line.
for example:

bash-3.00$ cat filename...
2,156
Posted By Shellslave
Hey Elixir, This change worked for me :)....
Hey Elixir,

This change worked for me :). but can you explain what is the difference between using \; and +

Thanks,
Shelly
2,156
Posted By Shellslave
cleaning up files using find...
I am trying to cleanup a directory with around 4000 files, and using the below command to delete all .gz files older than 60 days, I am having the same issue of arguments being too long. is there a...
2,065
Posted By Shellslave
Hey thanks this code works equally good.
Hey thanks this code works equally good.
2,065
Posted By Shellslave
Copy part of a variable
Hi,

i was using a input file to get the last line of the file.But now i have stored
the values from the file to a variable and want the last line from the variable . Slightly confused on how to...
3,772
Posted By Shellslave
@pogdorica yes you are right . The code you...
@pogdorica

yes you are right . The code you gave is working like miracle and is as per the requirement. Thanks for the effort.:)
3,772
Posted By Shellslave
Get the bottom line of a file to the top of the file
Hi,

i have a small requirement where i have to get the bottom most line from a file to the topmost position. a small example is shown below..

$ cat beep.txt
It is first documented as being...
1,543
Posted By Shellslave
Thanks a lot Frans :) i figured out another...
Thanks a lot Frans :)

i figured out another solution as below,


if [ $TIME1 -gt $TIME2 ];then
TIME2=`echo $TIME2+864| bc`
fi
1,543
Posted By Shellslave
Validate and Calculate
Hi,
i am trying to validate 2 variables and then subtract, the following code works well in AiX but when i try in Solaris it doesnt work.
((TIME1>TIME2)) && ((TIME2=TIME2+864))...
2,889
Posted By Shellslave
:)Thank you :b: its working
:)Thank you :b: its working
2,889
Posted By Shellslave
Split one Variable into three
Hi

i have a variable $VAR =15 14 13,

i want to split this number and store in 3 variables say
$N1=15
$N2=14
$N3=13

i know its simple but my mind is not giving me answers at this point...
4,481
Posted By Shellslave
When i use the above code i get $...
When i use the above code i get

$ ./Timestamp.sh
Start time: 00:13:01
End Time : 06:13:26
./Timestamp.sh: syntax error at line 1: `(' unexpected

So guess its not working..any other...
4,481
Posted By Shellslave
Difference between two timestamps Contd..
There was this thread earlier with the same name and the solution provided was excellent. Here is the solution to find diffrenc between two timestamp
$ cat timestamp
#! /usr/bin/ksh

echo enter...
Showing results 1 to 13 of 13

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