Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
hi,
i have a file having datas like that
./a.txt
12344
12345
12346
12347
.....
.....
...
i want to save this datas to another file like that
./b.txt
12344 12345 12346 12347 ... ... ...
i think awk can make this but how? :) waiting for ur help. (3 Replies)
Hi experts
I want your help to change the file format to my wanted version, please give me a hand thanks
$cat file
install pass
make os pass
make build kernel failed
usb storage pass
chane to
| *install* | *make os* | *make build kernel* | *usb storage* |
| pass | pass... (7 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hello everyone
Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried
sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 Replies)
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
Discussion started by: timmywong
8 Replies
9. Post Here to Contact Site Administrators and Moderators
Majority of the questions are pertaining file/string parsing w.r.t
sed
or
awk
It would be nice to have these two as their own sub category under shell-programming-scripting which can avoid lot of duplicate posts. (1 Reply)
Hi Experts,
I have a string with colon delimited, want 2nd colon to be changed to a pipe.
data:
101:8:43:4:72:14:41:69:85:3:137:4:3:0:4:0:9:3:0:3:12:3:
I am trying with sed, but can change only 1 occurance:
echo "101:8:43:4:72:14:41:69:85:3:137:4:3:0:4:0:9:3:0:3:12:3:" | sed 's/:/|/2'... (5 Replies)
Discussion started by: rveri
5 Replies
LEARN ABOUT REDHAT
lsusb
lsusb(8) Linux USB Utilities lsusb(8)NAME
lsusb - list all USB devices
SYNOPSIS
lsusb [options]
DESCRIPTION
lsusb is a utility for displaying information about all USB buses in the system and all devices connected to them.
To make use of all the features of this program, you need to have Linux kernel 2.3.15 or newer which supports the /proc/bus/usb interface.
OPTIONS -v Tells lsusb to be verbose and display detailed information about all devices.
-vv Tells lsusb to be very verbose and display even more information (actually everything the PCI device is able to tell).
-s [[<bus>]:][<devnum>]]
Show only devices in specified bus and devnum.
-d [<vendor>]:[<product>]
Show only devices with specified vendor and product ID. Both ID's are given in hexadecimal and may be omitted.
-p <procpath>
Use another path instead of /proc/bus/usb.
-D <device>
Do not scan the /proc/bus/usb directory, instead display only information if the device whose device file is given.
-t Tells lsusb to dump the physical USB device hierarchy as a tree.
FILES
/usr/share/hwdata/usb.ids
A list of all known USB ID's (vendors, products, classes, subclasses and protocols).
/proc/bus/usb
An interface to USB devices provided by the post-2.3.15 Linux kernels. Contains per-bus subdirectories with per-device files and a
devices file containing a list of all USB devices.
SEE ALSO lspci(8)AUTHOR
Thomas Sailer, <sailer@ife.ee.ethz.ch>.
usbutils-0.2 14 September 1999 lsusb(8)