9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am new to cut and I want to use the field option with a space delimiter on an Apache log file.
For example, if I wanted to find the 200 HTTP code using cut in this manner on the file below
cat access_abc.log | cut -d' ' -f7 | grep "200"
126.96.36.199 - - "GET /content/696-news041305... (4 Replies)
Discussion started by: sharingsunshine
2. Shell Programming and Scripting
I'm trying to view data using cut command for a fixed length file using the below command:
cut -c 1-3,4-5 FALCON_PIS_00000000.dat
I want to mention a separator say | (pipe) in between 1-3 and 4-5.
Please let me know how to achieve this.
Thanks in Advance, (3 Replies)
Discussion started by: HemaV
3. UNIX for Dummies Questions & Answers
i am trying to get JUST the PID from the ps command.
my command line is:
ps -ef | grep "mintty" | cut -d' ' -f2
but i get an empty line. i assume that the delimiter is not just one space character, but can't figure out what should i do in order to do that.
i know i can use awk or cut... (8 Replies)
Discussion started by: ran ber
4. Shell Programming and Scripting
I want to write a code that will cut everything that is under a couple of columns in a text file but so far I am not even close to achieve something like that.
Basically, I want to cut all the information from the columns and transfer the column information to a spread sheet.
I have... (1 Reply)
Discussion started by: pericopericone
5. Shell Programming and Scripting
Can anyone what I am doing wrong while using cut command.
for f in *.log
Log "Log file Name: $logfilename"
logfile1=`basename $logfilename .log`
Log "file length $flength"
from_length=$(($flength - 15))
Log "from... (2 Replies)
Discussion started by: dgmm
6. Shell Programming and Scripting
I'm working on formatting some attendance data to meet a vendors requirements to upload to their system. With some help on the forums here, I have the data close. But they've since changed what they want.
The vendor wants me to submit three fields to them. Field 1 is the studentid field,... (4 Replies)
Discussion started by: axo959
7. Shell Programming and Scripting
I would like to extract one or two fields of a line.
At the moment, I am extracting the first field of a line:
command | cut -f 1 -d '.' > file
The line can have two or three fields delimited with a dot.
if three fields, I want to be able to get the first two
ie if line =... (3 Replies)
Discussion started by: maxvirrozeito
8. Shell Programming and Scripting
I have a text:
dsj khfksjdh <time> EST 2006
ab cgnr jkkjt <time> EST 2006
gfhdgjghg <time> EST 2006
fkdjh kjhsekjrh kdjhfkh jhdfkhfdkjh kjdf <time> EST 2006
In the above file i need to extract time from every line... which is always the third from the last... Pls help!
Bouren (4 Replies)
Discussion started by: bourne
9. Shell Programming and Scripting
I want to cut two coloums simulatiously and paste in some other file
cut d ' ' -f3 -f4 xxx | paste yyy - > zzz;
from the above i want to cut two fileds 3 and 4 and paste as last coloums of single file (zzz).
how to solve this
rajan (1 Reply)
Discussion started by: rajan_ka1