03-24-2006
sed 's/|[ ]*/|/g' data
this will solve urs purpose
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have output a file and need to remove blank spaces in the first lines only so the file is left end justified. I need to do this while keeping the rest of the file intact.
Example of file that needs spaces removed:
space
space space
space space space
space... (3 Replies)
Discussion started by: tioray
3 Replies
2. UNIX for Dummies Questions & Answers
I stored results like this
VAR=`wc -l < ls.txt`
But the value of the wc gave me a padded number.
How do I strip the padding from $VAR?
Do you think I could use SED?
Except instead of a file input, have a variable redirection input? (2 Replies)
Discussion started by: yongho
2 Replies
3. Shell Programming and Scripting
I have a file with delimiter ~
ABC~12~43~TR ~890~poi~YU ~56~65
What I want is to remove spaces from column 4,7 and other columns as it is
So, the final file becomes
ABC~12~43~TR~890~poi~YU~56~65 (7 Replies)
Discussion started by: superprogrammer
7 Replies
4. Shell Programming and Scripting
hey..
i had a problem with the unix command when i want to remove the white spaces in a string..i guess i cud do it with a sed command but i get an error when i give space in the square brackets..
string="nh hjh llk"
p=`echo $string | sed 's/ //g'`
i donno how to give space charater and... (2 Replies)
Discussion started by: sahithi_khushi
2 Replies
5. UNIX for Dummies Questions & Answers
Hey,
I'm using the command from this thread https://www.unix.com/unix-dummies-questions-answers/590-converting-list-into-line.html
to convert vertical lines to horzontal lines. But I need to remove the spaces that is created. Unfortunately I can't figure out where the space is in the code..
I... (2 Replies)
Discussion started by: lost
2 Replies
6. Shell Programming and Scripting
Hi,
I want to remove spaces from data.
Data is:
1,aa ,21, 22
2,a a ,23 ,24
3, ,25 ,26
output should be:
1,aa,21,22
2,a a,23,24
3, ,25,26
i.e
i have to remove leading and trailing spaces.Not the space between data and also i dont want to remove the space if data is... (4 Replies)
Discussion started by: monika
4 Replies
7. Shell Programming and Scripting
Hello All,
I am trying to remove all tabspaces and all blankspaces from my file using sed & awk, but not getting proper code. Please help me out.
My file is like this (<b> means one blank space, <t> means one tab space)-
$ cat file
NARESH<b><b><b>KUMAR<t><t>PRADHAN... (3 Replies)
Discussion started by: NARESH1302
3 Replies
8. Shell Programming and Scripting
Hello,
I have a Folder (myfile) which contain the following files:
P$12789865KR +N+01+OM+16102009165416.nu
P$M1-508962GD +N+01+ALP+14102009094417.nu
Is there a sed command(s) that will loop through this folder
and remove the spaces that exists in the filename?
Any help would be... (7 Replies)
Discussion started by: Fishn
7 Replies
9. Shell Programming and Scripting
HI,
I have a file with lot of blank lines, how can I remove those using awk??
Thanks,
Shruthi (4 Replies)
Discussion started by: shruthidwh
4 Replies
10. Shell Programming and Scripting
I have pipe separated file with lots of blank spaces.
After using sed -e 's/ *| */|/g' this command ,its giving me output as
TT0000013101640|
HCAMBLAMCNB010|Jul 3 2012 11:14AM|
HARYANA|
Bangali Mohalla |
TCL-UBR|9368040005|9355264655|9218509220|NULL
... (5 Replies)
Discussion started by: sususa
5 Replies
LEARN ABOUT SUNOS
usb_if_descr
usb_if_descr(9S) Data Structures for Drivers usb_if_descr(9S)
NAME
usb_if_descr - USB interface descriptor
SYNOPSIS
#include <sys/usb/usba.h>
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI)
DESCRIPTION
The usb_if_descr_t interface descriptor defines attributes of an interface. A configuration contains one or more interfaces. An interface
contains one or more endpoints.
Please refer to Section 9.6.5 of the USB 2.0 specification. The USB 2.0 specification is available at www.usb.org.
One or more configuration descriptors are retrieved from a USB device during device enumeration. They can be accessed via
usb_get_dev_data(9F).
A interface descriptor has the following fields:
uint8_t bLength Size of this descriptor
in bytes.
uint8_t bDescriptorType Set to USB_DESCR_TYPE_IF.
uint8_t bInterfaceNumber Interface number (0-based).
uint8_t bAlternateSetting Alternate setting number for
this interface and its
endpoints (0-based).
uint8_t bNumEndpoints Number of endpoints,
excluding endpoint 0.
uint8_t bInterfaceClass Interface Class code
(see below).
uint8_t bInterfaceSubClass Sub class code. (See USB 2.0
specification of applicable
interface class for information.)
uint8_t bInterfaceProtocol Protocol code. (See USB 2.0
specification of applicable
interface class for information.)
uint8_t iInterface Index of optional string
describing this interface
Valid if > 0. Pass to
usb_get_string_descr(9F) to
retrieve string.
USB 2.0 specification interface descriptor bInterfaceClass field
values are as follows:
USB_CLASS_APP Application-specific interface class
USB_CLASS_AUDIO Audio interface class
USB_CLASS_CCID Chip/Smartcard interface class
USB_CLASS_CDC_CTRL CDC control interface class
USB_CLASS_CDC_DATA CDC data interface class
USB_CLASS_SECURITY Content security interface class
USB_CLASS_DIAG Diagnostic interface class
USB_CLASS_HID HID interface class
USB_CLASS_HUB HUB interface class
USB_CLASS_MASS_STORAGE Mass storage interface class
USB_CLASS_PHYSICAL Physical interface class
USB_CLASS_PRINTER Printer interface class
USB_CLASS_VENDOR_SPEC Vendor-specific interface class
USB_CLASS_WIRELESS Wireless interface class
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Architecture |PCI-based systems |
+-----------------------------+-----------------------------+
|Interface stability |Evolving |
+-----------------------------+-----------------------------+
|Availability |SUNWusbu |
+-----------------------------+-----------------------------+
SEE ALSO
attributes(5), usb_get_alt_if(9F), usb_get_cfg(9F), usb_get_dev_data(9F), usb_get_string_descr(9F), usb_parse_data(9F), usb_cfg_descr(9S),
usb_ctrl_request(9S), usb_dev_descr(9S), usb_dev_qlf_descr(9S), usb_ep_descr(9S), usb_other_speed_cfg_descr(9S), usb_string_descr(9S)
SunOS 5.10 5 Jan 2004 usb_if_descr(9S)