10-13-2008
separate a line having particular field
hi
i have a file containes data like,
20081013-030618.675199 [2712] D 17 Change state DATA_RECEIVE->EOD, RC=0
20081013-030618.868358 [2712] D 17 Reading data...
20081013-030618.868498 [2712] D 18 Received 5 bytes
20081013-030618.868537 [2712] U Buffer received:
now i need to cut the 4th field i.e 17 and write that line into a separate file
please help
thanks in advance
Satya
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a log file that I am trying to convert. File contents something like this:
aaaaa bbbbbb cccc dddddd\123 eeeee ffffffff
I am trying to output the fields in a different order and separate field 4 so that the "123" and "dddddd" can be output separately. for example
bbbbbb aaaaa 123... (5 Replies)
Discussion started by: jake1988
5 Replies
2. Shell Programming and Scripting
Hi,
I have a line which has n number of words with separated by space.
I wanted to make each word as a separate line.
for example,
i have a file that has line like
i am a good boy
i want the output like,
i
am
a
good (8 Replies)
Discussion started by: rbalaj16
8 Replies
3. Shell Programming and Scripting
Hi Experts,
I am having a requirement like this;
Input file
EIM_ACCT.ifb|1001|1005
EIM_ADDR.ifb|1002|1004
EIM_ABD.ifb|1009|1007
I want to read each line of this file and pass each line,one at a time,as an argument to another script.
eg;
1.read first line->store it to a file->call... (2 Replies)
Discussion started by: ashishpanchal85
2 Replies
4. Shell Programming and Scripting
Hi Gurus,
I need separate one file which is one huge line to mutiple line.
file like
abcd # bcd # def # fge # ged
I want to get
abcd
bcd
def
fge
ged
Thanks in advance (4 Replies)
Discussion started by: ken6503
4 Replies
5. Shell Programming and Scripting
hi Gurus,
I need separate a file which is one huge line to multiple lines based on certain number of charactors. for example:
abcdefghi high abaddffdd
I want to separate the line to multiple lines for every 4 charactors.
the result should be
abcd
efgh
i hi
gh a
badd
ffdd
Thanks in... (5 Replies)
Discussion started by: ken6503
5 Replies
6. Shell Programming and Scripting
Hi,
Variable1 = MKT1,MKT2,MKT3,MKT4
Now i want to store each of these value seperated by comma to a array and access each of the values. Also find out number of such values seperated by comma.
Variable1 can have any number of values seperated by comma.
Thanks :) (3 Replies)
Discussion started by: arghadeep adity
3 Replies
7. Shell Programming and Scripting
Hello,
I have a text file in the below format:
Source Destination State Lag Status
CQA02W2K12pl:D:\CAQA ... (10 Replies)
Discussion started by: pocodot
10 Replies
8. UNIX for Beginners Questions & Answers
example of problem:
when I echo "$e" >> /home/cogiz/file.txt
result prints to file as:AA
BB
CC
I need it to save to file as this:AA BB CC
I know it's probably something really simple but any help would be greatly appreciated.
Thank You.
Cogiz (7 Replies)
Discussion started by: cogiz
7 Replies
9. Shell Programming and Scripting
I am trying to use awk to create (in this example) 3 seperate text file from the unique id in $1 in file, if it starts with the pattern aa. The contents of each row is used to populate each text file except for $1 which is not needed. It seems I am close but not quite get there. Thank you :).
... (3 Replies)
Discussion started by: cmccabe
3 Replies
10. UNIX for Beginners Questions & Answers
Hi,
A beginner one.
my input.tab (tab-separated):
h1 h2 h3 h4 h5
item1 grpA 2 3 customer1
item2 grpB 4 6 customer1
item3 grpA 5 9 customer1
item4 grpA 0 0 customer2
item5 grpA 9 1 customer2
objective:
output a file for each customer ($5) with the item number ($1) only if $2 matches... (2 Replies)
Discussion started by: beca123456
2 Replies
LEARN ABOUT LINUX
modinfo
modinfo(8) System Manager's Manual modinfo(8)
NAME
modinfo -- program to show information about a Linux Kernel module
SYNOPSIS
modinfo [-0] [-F field] [-k kernel] [modulename|filename ...]
modinfo -V
modinfo -h
DESCRIPTION
modinfo extracts information from the Linux Kernel modules given on the command line. If the module name is not a filename, then the
/lib/modules/version directory is searched, as is also done by modprobe(8) when loading kernel modules.
modinfo by default lists each attribute of the module in form fieldname : value, for easy reading. The filename is listed the same way
(although it's not really an attribute).
This version of modinfo can understand modules of any Linux Kernel architecture.
OPTIONS
-V --version
Print the modinfo version.
-F --field
Only print this field value, one per line. This is most useful for scripts. Field names are case-insenitive. Common fields
(which may not be in every module) include author, description, license, parm, depends, and alias. There are often multiple
parm, alias and depends fields. The special field filename lists the filename of the module.
-k kernel Provide information about a kernel other than the running one. This is particularly useful for distributions needing to extract
information from a newly installed (but not yet running) set of kernel modules. For example, you wish to find which firmware
files are needed by various modules in a new kernel for which you must make an initrd/initramfs image prior to booting.
-0 --null Use the ASCII zero character to separate field values, instead of a new line. This is useful for scripts, since a new line can
theoretically appear inside a field.
-a -d -l -p -n
These are shortcuts for author, description, license. parm and filename respectively, to ease the transition from the old modu-
tils modinfo.
COPYRIGHT
This manual page originally Copyright 2003, Rusty Russell, IBM Corporation. Maintained by Jon Masters and others.
SEE ALSO
modprobe(8)
modinfo(8)