Search Results

Search: Posts Made By: Whiteboard
32,520
Posted By Whiteboard
How to grep the contents inside a tar file
Hi All

I have searched the possibility of this options everywhere but am unable to find it in any forum.

I have a tar file inside which there are n number of files and i dont know them. I...
8,085
Posted By Whiteboard
The below would give you the exact file count. ...
The below would give you the exact file count.


ls -lrt | grep "^-r"
Forum: Solaris 07-12-2010
12,252
Posted By Whiteboard
Thanks for all the repleis
Thanks for all the repleis
Forum: Solaris 07-06-2010
12,252
Posted By Whiteboard
Thanks. Is there any other way where we can find...
Thanks. Is there any other way where we can find the process holding that port without the root user ( We dont have the root password).

Thanks
W
Forum: Solaris 07-05-2010
12,252
Posted By Whiteboard
How to check which process is holding up the ilde port
HI All

Am on Sun OS.While trying to start a process , we could see that the port is idle and we are not able to find the process holding that port.

Below is the result we get after using...
2,841
Posted By Whiteboard
Problem with sed command
Hi All

Am trying to insert 100 beneath 35 but the below command is not working. Can some one help me in this.



12 23
12
23
35

sed '/35/a 100' file1



The error is below

...
2,797
Posted By Whiteboard
I guess the below can help you out... ...
I guess the below can help you out...


grep -f file2 file1
1,850
Posted By Whiteboard
egrep "The Far end|Heartbeat" Filename | grep -v...
egrep "The Far end|Heartbeat" Filename | grep -v "DLEP"
1,782
Posted By Whiteboard
The below can also help you... cat...
The below can also help you...


cat filename | tr -d "\040" | cut -c 3-5

cat filename |tr -d "\040" | awk '{print substr ($0,3,3)}'
2,320
Posted By Whiteboard
It's always a good practice to use -n option...
It's always a good practice to use -n option while sorting numbers....


sort -n filename
2,768
Posted By Whiteboard
u meant to say you want to replace two different...
u meant to say you want to replace two different ips with different names????


sed -e 's/\<192.168.1.4\>/v5c0/g' -e 's/192.168.1.41/acc1/g' filename



If you want to read about sed...
3,070
Posted By Whiteboard
You can also use egrep but if the file size is...
You can also use egrep but if the file size is huge its better to use awk...
4,003
Posted By Whiteboard
Please explain your code Thanks white
Please explain your code

Thanks
white
12,555
Posted By Whiteboard
seems to be working fine for me... $ cat...
seems to be working fine for me...


$ cat file1
123 abc
456 def

$ cat file2
123 ijk
123 ijk
456 lmn
456 lmn

$ sort file1 file2
123 abc
123 ijk
123 ijk
456 def
456 lmn
456 lmn
1,875
Posted By Whiteboard
Post your sample output....
Post your sample output....
104,118
Posted By Whiteboard
This will display only the first line but the...
This will display only the first line but the requirement is he wants to display except 1st line...

One more


tail +2 filename
66,828
Posted By Whiteboard
The reason might be you do not have sufficient...
The reason might be you do not have sufficient permissions to access that log file... Change the permissions using chmod and try your command
8,364
Posted By Whiteboard
You can use tr command... man tr ...
You can use tr command...


man tr


Post a sample input and output using code tags if you are not convinced
1,203
Posted By Whiteboard
Sample example.... $ cat file1 line 1 ...
Sample example....


$ cat file1
line 1
line 2
line 3
line 4

$ cat file2
123
456

$ sed '2 r file2' file1
line 1
line 2
123
456
line 3
line 4
11,786
Posted By Whiteboard
Posting homework questions are against the...
Posting homework questions are against the rules...
35,543
Posted By Whiteboard
$ echo "ListenAddress=ABCServer1,ABCServer2" |...
$ echo "ListenAddress=ABCServer1,ABCServer2" | awk -F "=" '{print $2}' | sed 's/,/ /g'
ABCServer1 ABCServer2
1,643
Posted By Whiteboard
hmmm seems that your explanation and your sample...
hmmm seems that your explanation and your sample output seems different... If your explanation is right then shahul's code will work or else mine...
1,643
Posted By Whiteboard
$ cat file | tr " " "\n" BAW BRITISH ...
$ cat file | tr " " "\n"
BAW
BRITISH
AIRWAYS
RYR
RYAN
AIR
10,665
Posted By Whiteboard
Its working fine for me... $ cat file BLUE...
Its working fine for me...

$ cat file
BLUE
YELLOW
RED
VIOLET
RED
RED
BLUE
WHITE
YELLOW
BLACK

$ awk '!x[$0]++' file
BLUE
YELLOW
RED
VIOLET
WHITE
2,192
Posted By Whiteboard
$ cat file1 | paste -d " " - - -|sed G blah 456...
$ cat file1 | paste -d " " - - -|sed G
blah 456

dah 789

zah 123
Showing results 1 to 25 of 115

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