10-18-2002
try this...
for i in `cat yourfile`
do
col1=`echo $i | cut -b1-5`
col2=`echo $i | cut -b6-`
echo $col1 ',' $col2
done
there will be more straight forward way than this... and I will love to see that...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hello
A small shell scripting help..
I have a file say with 5 lines of text (text file).
At the end of everyline I need to add a comma at the end of the file.
Thanks, ST2000 (4 Replies)
Discussion started by: ST2000
4 Replies
2. UNIX for Dummies Questions & Answers
Srr for being pain her
let say i have a data in a file like this
1@1000
2@2000
4@4000
5@7770
6@8998
7@80008
i am a newbie in Unix
i need to add a comma to integer using AWK function. for example, 1,000 or 80,008
how can i do that
ps. i'm using bash shell (1 Reply)
Discussion started by: Nutter
1 Replies
3. Shell Programming and Scripting
Hi all,
I have a list of IP addresses in a column in a text file name ipaddress.txt
192.168.0.1
192.168.0.2
192.168.0.5
192.168.0.4
192.168.0.5
I would like to convert ipaddress.txt to have the following thing :
192.168.0.1, 192.168.0.2, 192.168.0.3,192.168.0.4,192.168.0.5
I know... (4 Replies)
Discussion started by: oliv66
4 Replies
4. Shell Programming and Scripting
Hello there,
I have a comma separated csv , and all the text field is wrapped by double quote. Issue is some text field contain comma as well inside double quote. so it is difficult to process.
Input in the csv file is ,
1,234,"abc,12,gh","GH234TY",34
I need output like below,... (8 Replies)
Discussion started by: Uttam Maji
8 Replies
5. UNIX for Dummies Questions & Answers
Hi all
Requirement:
I need to generate a comma seperated file(.csv)
I have one functions which returns me some values in a array. Now i want to add comma after every value that gets stored in the array.
E.g:
arr=$var1","
Expected:
arr=abc,
arr=def,
.
.
likewise
thanks in advance... (4 Replies)
Discussion started by: Ganesh_more
4 Replies
6. Shell Programming and Scripting
Example data
Gi1/10
Gi1/12 xl32lytscb07
3/11 to nyc
3/12 41764 ecomm
3/13 hxcsxsa 2/1
3/14 ziim570-rsvd
3/15 xl3NDSADM
Po1 VPC trunk to xl3-i
Po2 ***DO NOT ENABLE**
Po13 *** VPC link to
Po101
Po102 xl3-2lyg1accsgh-fe... (7 Replies)
Discussion started by: sumguy
7 Replies
7. UNIX for Dummies Questions & Answers
Hi... I can't find my little red AWK book and it's been a long while since I've awk'd. But I need to take a CSV file and convert the first word of the fifth field to its own field by replacing a space with a comma.
This is for importing a spreadsheet of issues into JIRA...
Example:
a line... (9 Replies)
Discussion started by: Tawpie
9 Replies
8. Shell Programming and Scripting
Hi,
00000119EEEC3F25 feedoor 20171103
0000011A4F152077 feedard 20171024
00000191FA295F61 feedzipperhola 20171023
00000213C57BB856 feedriodapple 20171005
0000025F778EF9D5 joobakoolrk 20171004
I needed the result as:
"00000119EEEC3F25", "feedoor", ... (9 Replies)
Discussion started by: ashokvpp
9 Replies
9. Shell Programming and Scripting
Hi Experts,
Please support
I have below data in file in comma seperated, but 4th column is containing comma in between numbers, bcz of which when i tried to parse the file the column 6th value(5049641141) is being removed from the file and value(222.82) in column 5 becoming value of column6.
... (3 Replies)
Discussion started by: as7951
3 Replies
10. Shell Programming and Scripting
Hi,
I've got this output:
# cat test2.txt
TM1ITP1-TMNLSTP1 SLC00=0,SLC01=0,SLC02=0,SLC03=0
if I just use cat test2.txt | tr "," "\n" I'll end up very near to what I'm trying to achieve:
TM1ITP1-TMNLSTP1 SLC00=0
SLC01=0
SLC02=0
SLC03=0
But how can i eventually add the term... (1 Reply)
Discussion started by: nms
1 Replies
LEARN ABOUT HPUX
rpccp_add_member
add member(1m) add member(1m)
NAME
add member - Adds a member to a group in a name service entry; if the specified entry does not exist, creates the entry
SYNOPSIS
rpccp add member group-entry-name -m member [-s syntax]
OPTIONS
Declares the name of a member to be added to the specified group entry (required).
You can add only one member at a time. Indicates the name syntax of the entry name (optional). The only value for this option is the dce
name syntax, which is the default name syntax. Until an alternative name syntax becomes available, specifying the -s option is unnecessary.
ARGUMENTS
Specifies the name of the target group. For an entry in the local cell, you can omit the cell name and specify only the cell-relative
name.
DESCRIPTION
The add member command adds a member to a group in a name service entry. The name of the entry containing the group and the name of the
new group member are required. The entry of a group may have been created previously (by either the add entry or add member command). If
the specified entry does not exist, the add member command tries to create the entry.
Privilege Required
You need both read permission and write permission to the CDS object entry (the target group entry). If the entry does not exist, you also
need insert permission to the parent directory.
NOTE
This command is replaced at Revision 1.1 by the dcecp command and may not be provided in future releases of DCE.
EXAMPLES
The following commands run RPCCP and add the member /.:/LandS/anthro/Cal_host_3 to the group /.:/LandS/anthro/Calendar_group: $ rpccp
rpccp> add member > -m /.:/LandS/anthro/Cal_host_3 > /.:/LandS/anthro/Calendar_group
RELATED INFORMATION
Commands: remove group(1m), remove member(1m), show group(1m)
add member(1m)