Search Results

Search: Posts Made By: reddysiva
2,268
Posted By reddysiva
try this [root@Reddyraja tmp]# date -d "3...
try this

[root@Reddyraja tmp]# date -d "3 days ago"
Sat Jun 13 19:04:33 IST 2009

[root@Reddyraja tmp]# date -d "3 days"
Fri Jun 19 19:05:50 IST 2009

[root@Reddyraja tmp]# date -d "3...
11,310
Posted By reddysiva
try this file_name=wordfile ...
try this

file_name=wordfile

num_words=`wc -w < $file_name`

rand_word=`expr "$RANDOM" % $num_words + 1`

cat $file_name | tr "\n" " " | awk -v randword=$rand_word '{print $randword}'
3,715
Posted By reddysiva
if u r using vi editor try this there...
if u r using vi editor

try this

there is command to alinment

1. escape (escape mode)
2. gg (goto first line)
3. shift+v (visual mode)
4. shift+g (goto to last line)
5. = (alinment)
2,842
Posted By reddysiva
try this #!/bin/bash ...
try this

#!/bin/bash

outputFile=topOutput_`uname -n`
echo "Output: " $outputFile

for ((;;));
do
(date +%T | tr "\n" " " && ps -A ux | sort -rn -k 3 | awk 'NR<6 &&...
7,915
Posted By reddysiva
no space between --time and -style use...
no space between --time and -style use --time-style
ls -l --time -style=+%Y%m%d%H%M%S | awk '{print $7$6}'


[root@Reddyraja test]# ls --version
ls (GNU coreutils) 6.10
Copyright (C) 2008...
7,915
Posted By reddysiva
[root@Reddyraja test]# ls -l total 0 ...
[root@Reddyraja test]# ls -l
total 0
-rw-r--r-- 1 root root 0 2009-05-08 18:39 test1.log
-rw-r--r-- 1 root root 0 2009-05-08 18:39 test.log
[root@Reddyraja test]# ls -l --time-style=+%Y%m%d%H%M%S...
7,915
Posted By reddysiva
try this ls -l --time-style=+%Y%m%d%H%M%S |...
try this

ls -l --time-style=+%Y%m%d%H%M%S | awk '{print $7$6}'
2,065
Posted By reddysiva
try this cat >> testing.xml << EOF <?xml...
try this
cat >> testing.xml << EOF
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response scannerId="888888" success="true" userId="444" xmlns="404 - Not Found">
<locInfo>
...
1,277
Posted By reddysiva
Try this sed "s/^M//" automate.sh...
Try this

sed "s/^M//" automate.sh >newautomate.sh

to print ^M use (Ctl+v and Ctl+m)
5,683
Posted By reddysiva
if you know time diffrence try this ...
if you know time diffrence
try this

[root@Reddyraja reddy]# date +"%F %T"
2009-03-17 12:53:11
to add 10 minutes
[root@Reddyraja reddy]# date +"%F %T" -d" 10 minutes"
2009-03-17 13:03:13
to...
1,844
Posted By reddysiva
Try this myfile=$(date '+ABC%Y%m%d') for i in...
Try this
myfile=$(date '+ABC%Y%m%d')
for i in *.txt
do
mv $i `echo $i | sed "s/$myfile//"`
done

i thik u didnt use back tics or $() to set variable myfile.
to expend $myfile use " instead...
Showing results 1 to 11 of 11

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