04-05-2012
Hi, try awk '{print $8}' instead of cut -d " " -f 8
This User Gave Thanks to Scrutinizer For This Post:
10 More Discussions You Might Find Interesting
1. Slackware
not sure how to do it. wan't to delete it using cut and grep ince i would use it in the shell.
but how must the command be?
grep "64.233.181.103 wwwGoogle.com" /etc/hosts | cut -d
the delimeter is just a space. can you help meplease. :D (1 Reply)
Discussion started by: garfish
1 Replies
2. Shell Programming and Scripting
Hi,
I got a line of text which has spaces in between and it is a long stream of characters. I want to extract the text from certain position. Below is the line and I want to take out 3 characters from 86 to 88 character position. In this line space is also a character. However when using cut... (5 Replies)
Discussion started by: asutoshch
5 Replies
3. Shell Programming and Scripting
i am using 'psu' to grep the status of a process like below :-
psu|grep -i agentf
29559 29552 0 00:53:05 ? 0:57 gn1avm_agent -n AGENTF1
28946 1 0 00:51:31 ? 0:31 gnavm_ewd -b gn1avm_agent -n AGENTF1 -c -n AGENTF1
29552 28946 0 00:53:05 ? 0:00 /bin/ksh... (6 Replies)
Discussion started by: deepakiniimt
6 Replies
4. HP-UX
I have 2 files; one file (say, details.txt) contains the details of employees and another file (say, emp.txt) has some selected employee names. I am extracting employee details from details.txt by using emp.txt and the corresponding code is:
while read line
do
emp_name=`echo $line`
grep -e... (7 Replies)
Discussion started by: arb_1984
7 Replies
5. UNIX for Dummies Questions & Answers
How am I supposed to print with one Unix command the names (and only the names) of company JMT? Problems with scandinavian letters? By typing
grep JMT url | egrep --only-matching ']+'I still have company name and + marks I should get rid of.
I'd be very grateful of your help bacause I am new... (1 Reply)
Discussion started by: jht
1 Replies
6. Shell Programming and Scripting
I am writing a shell script to skip couple of feilds in a flat file and as a part of this I have written the below piece of code in it.
cut -d '|' -f 1-17,19-31 $1 > filename
To add pipe at end of the line I used below command, but it adds even to header and footer as well which i... (11 Replies)
Discussion started by: Aditya_001
11 Replies
7. Shell Programming and Scripting
Need help to append a pipe at end of the line immediately after the cut command,
I have an Input flat file with 16 feilds and I am removing the 16th feild by using the cut command as shown,
Input:
354|||||CORPORTATION||||NENE PARADE|||WISBECH|CAMBRIDGESHIRE|PE13 3BY|100001|
I... (5 Replies)
Discussion started by: Aditya_001
5 Replies
8. Shell Programming and Scripting
Hi,
I'm writing a shell script and trying to grep a variable value, it works fine as long as there is a value in /tmp/list.out which is captured in $DSK but sometimes the file tends to be empty and that is where I'm having an issue while using grep which returns nothing. I know I can use something... (15 Replies)
Discussion started by: mbak
15 Replies
9. Shell Programming and Scripting
more jdbc.xml
<name>Fast_ds/DataSource</name>
<property>
<name>user</name>
<value>COL_USER</value>
</property>Command 1:
grep -A1 '<name>user</name>' jdbc.xml|grep -v '<name>user</name>'|sed 's/\(<value>\|<\/value>\)//g'| sed -e 's/^*//'Output:
Command 2:
grep... (5 Replies)
Discussion started by: mohtashims
5 Replies
10. Shell Programming and Scripting
Hi All,
I am facing an issue while cutting fields with comma delimiter. There are many records with Double quotes in between.
My data: aaa,bbb,"ccc, ddd",eee,fff,"ggg ,hhh",iii
When i use cut command with comma delimiter, i am getting wrong data like
field1=aaa
field2=bbb
field3="ccc... (3 Replies)
Discussion started by: krishna_gnv
3 Replies