Search Results

Search: Posts Made By: anish19
2,764
Posted By anish19
HI Its not working >ls -l fil1.txt >...
HI
Its not working

>ls -l fil1.txt > /opt/temp/a.txt 2>errfile
Ambiguous output redirect.
>ls -l fil1.txt 2 > errfile
fil1.txt: No such file or directory
2: No such file or directory
>...
2,764
Posted By anish19
Redirection of ls -l output
Hi
I am making a script where i want to redirect the output of ls -l to a file
Example
#ls -l fil1.txt > /opt/temp/a.txt
ac: No such file or directory

I want to capture output of this command...
2,096
Posted By anish19
Its returning process ID >ps -ef | grep -i...
Its returning process ID

>ps -ef | grep -i snoop
root 26288 21712 0 11:33:48 pts/2 0:00 sh snooptest.sh
root 26303 23695 0 11:33:52 pts/3 0:00 grep -i snoop
nobody...
2,096
Posted By anish19
snoop script in background
Hi
I want to write a script for snoop which can do snoop for 30 min and then process should be killed automatically

I am using below codes

#!/usr/bin/ksh
snoop -d igb0 -o /opt/temp/abc.pcap...
1,279
Posted By anish19
matching file problem
hi
I need help for matching two files

a.txt
123,20080921,2419,ec1,20081021
456,20080923,2420,ec1,20081021
789,20080920,2419,ec1,20081021
124,20080921,2421,ec1,20081023...
2,342
Posted By anish19
thanks its working now.........:)
thanks its working now.........:)
2,342
Posted By anish19
hi its giving error cat a.txt 123,b,c,d,e...
hi its giving error

cat a.txt
123,b,c,d,e
111,c,d,e,f,
456,a,k,j,h

cat b.txt
123
678
987
321
456

awk -F, 'FNR==NR {a[$1];next;}($1 in a) {print $1","$4","$5}' b.txt a.txt
awk:...
2,342
Posted By anish19
thanks for reply but grep -f is not supported in...
thanks for reply but grep -f is not supported in my system
2,342
Posted By anish19
compare and redirect to new file
hi i have two file

a.txt
123,b,c,d,e
111,c,d,e,f,
456,a,k,j,h

b.txt
123
678
987
321
456

i want to compare these two files(match content of b first coloum with a ) and o/p should be...
34,990
Posted By anish19
change the time stamp of file
can we change the timestamp of a file to old date.

-rwxrwxrwx 1 root other 330 Jul 1 16:03 abc.txt

it shows creation time is 16.03 can i change it to previous time

:)
2,466
Posted By anish19
Thanks era........... :)
Thanks era...........

:)
2,466
Posted By anish19
Hi thanks for reply but when i am running this...
Hi thanks for reply but when i am running this command it gives o/p
>cat a.txt
2,3,4,5,6,7,8,9,0,33,44,55,66
3,4,5,6,7,8,3,2,1,55,66,78,88
>awk '{ for (i=1; i<=5; ++i) sum[i] += $i; if (i > max)...
2,466
Posted By anish19
Thanks for quick reply....:) can u pls...
Thanks for quick reply....:)

can u pls suggest me command if i will be having more than 2 coloums like
2,3,4,5,6,7,8,9,0,33,44,55,66
3,4,5,6,7,8,3,2,1,55,66,78,88


and if i have to add...
2,466
Posted By anish19
add multiple colum using awk
hi i need help in my script
i have a file
a.txt
3,4,5,13
6,7,8,45
9,0,1,67

i want to add 2nd and 3rd colum like o/p will be by adding all values of colum2(4+7+0) and colum 3(5+8+11)

o/p:
...
4,520
Posted By anish19
Hi Thanks for ur reply but have little bit...
Hi

Thanks for ur reply but have little bit doubt

if i have file
ename Mohan
ename2 Mohan
eid 2008
ename Shyam
eid 345

and i will give sed -n -e '/Mohan/ {n; p;}' filename
it wiil give...
4,520
Posted By anish19
print next line if matches a particular word..need help
Hi
i need a help for making a script whch can print next line if it matches a particular word
like file1 have
ename Mohan
eid 2008
ename Shyam
eid 345

if scipt got Mohan it will print...
Showing results 1 to 16 of 16

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