09-30-2009
One more question please...
Thanks a lot for your quick response. That seemed to work pretty well
I would also like to get a solution to actually get rid of the entire last field including the last comma from every line. Basically the entire field ",-g 1253888723-g 1253889445"
Toms
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
1 . Thanks everyone who read the post first.
2 . I have a log file which size is 143M , I can not use vi open it .I can not use xedit open it too.
How to view it ?
If I want to view 200-300 ,how can I implement it
3 . Thanks (3 Replies)
Discussion started by: chenhao_no1
3 Replies
2. UNIX for Advanced & Expert Users
I have a file with one of the following lines, when opened with vi
33560010686GPT£120600GBPGBP10082007DS
In the above line, I want to get rid of the junk character before the £ (pound sysmbol).
When I tried copying £ from windows and copy in unix vi, it prints as £ and I tried pattern replace... (2 Replies)
Discussion started by: nskworld
2 Replies
3. Shell Programming and Scripting
A sed command works most of the time however it fails sometimes.
I put each line (record) I read of a file through the following command
data=$(cat file | sed 's///g' | sed 's|.*ex:Msg\(.*\)ex:Msg.*|\1|' )
When I run the script I get a message that states that there is an invalid format... (6 Replies)
Discussion started by: gugs
6 Replies
4. Shell Programming and Scripting
Hi
I have a file wich contains ^M characters, looks like these are from DOS,
Is there a way to get rid of them? Thanks -A (3 Replies)
Discussion started by: aoussenko
3 Replies
5. Shell Programming and Scripting
Hello.
I'm using a file to "grep" in a 2nd one (with awk)
cat file1
2 first user
9 second user
1 third user (with a space after user)
I want to get the line except the 1st field so I do :
field=$(gawk '{$1 =""; print $0}' file | sed 's/^ //')
It works but it deletes... (5 Replies)
Discussion started by: xanthos
5 Replies
6. UNIX for Dummies Questions & Answers
I have a 5000 line config.log file with several "maybe" errors. Any reccomendations on finding solvable problems? (2 Replies)
Discussion started by: NeedLotsofHelp
2 Replies
7. UNIX for Dummies Questions & Answers
When I use vi to see what's in the file I get this:
int add1(int x) {^M return x + 1;^M}
^Mint subtract1(int x) {^M return x - 1;^M}
^Mint double_it(int x) {^M return x * 2;^M}
^Mint halve_it(int x) {^Mreturn x / 2;^M}
^Mint main() {^M int myint;^M int result;^M ... (2 Replies)
Discussion started by: Nonito84
2 Replies
8. Shell Programming and Scripting
I am trying to write a shell script which takes an input file as an arguement in the terminal e.g. bash shellscriptname.sh input.txt. I would like for the file to be read line by line each time checking if the .txt file contains certain words or letters(validating the syntax). If the line being... (1 Reply)
Discussion started by: Gurdza32
1 Replies
LEARN ABOUT CENTOS
usb_gadget_config_buf
USB_GADGET_CONFIG_BU(9) Kernel Mode Gadget API USB_GADGET_CONFIG_BU(9)
NAME
usb_gadget_config_buf - builts a complete configuration descriptor
SYNOPSIS
int usb_gadget_config_buf(const struct usb_config_descriptor * config, void * buf, unsigned length,
const struct usb_descriptor_header ** desc);
ARGUMENTS
config
Header for the descriptor, including characteristics such as power requirements and number of interfaces.
buf
Buffer for the resulting configuration descriptor.
length
Length of buffer. If this is not big enough to hold the entire configuration descriptor, an error code will be returned.
desc
Null-terminated vector of pointers to the descriptors (interface, endpoint, etc) defining all functions in this device configuration.
DESCRIPTION
This copies descriptors into the response buffer, building a descriptor for that configuration. It returns the buffer length or a negative
status code. The config.wTotalLength field is set to match the length of the result, but other descriptor fields (including power usage and
interface count) must be set by the caller.
Gadget drivers could use this when constructing a config descriptor in response to USB_REQ_GET_DESCRIPTOR. They will need to patch the
resulting bDescriptorType value if USB_DT_OTHER_SPEED_CONFIG is needed.
AUTHOR
David Brownell <dbrownell@users.sourceforge.net>
Author.
COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 USB_GADGET_CONFIG_BU(9)