Hi Chubler_XL, I do not think the grep command is the issue here, I replaced the grep command with just echo $HOST_NAME and I still get the same error message:
The code:
The error message i get using above is:
stdin: line too long
I checked my input file, when I perform a cat on it the ouput is something like below:
and the same code works fine, I guess I need the routine which can sort the csv doesnt matter if teh file has extra line at the end or not.
@rdcwayx : I will give a try to your routine as well.
Thanks for your input everyone, really appreciate your help. I will post the results once try rdcwayx's routine.
---------- Post updated at 11:25 PM ---------- Previous update was at 10:37 PM ----------
Folks, the awk utility provided by rdcwayx is working fine, the only question I have now is that will it able to handle any kind of input file i.e the one with a extra line and one without a extra line at the end?
Many thanks again to rdcwayx and Chubler_XL for their time and input.
Hi, all. IM new to this forum.
I wanted to write a shared library for my program. However, I need the library to have some self initialization routines before anyother functions in the library are called.
Like the ones available for gcc __attribute__ ((constructor)).
I tried int... (1 Reply)
Hi buddies i have doubt. I 'm new to unix script and learning. I have a req.
I need to find the values mentioned in the double quoutes of each line and write it into a csv file. How do I handle this? Please help me.
SCTY_ISS_ID (SCTY_ISS_ID:Dec18Fixed.0:): "37927320080309"
TRD_DT... (6 Replies)
Hi,
I have a .csv file which contains script names, subjects and email_addresses
The first two colums are always script name and subject, the next 20 colums are email address..
What i want to do is sort the email address in alphabetical order for each row and there's around 1200 rows.
So... (3 Replies)
Hi all,
in my csv file it'll look like this, and of course it may have more columns
US to UK;abc-hq-jcl;multimedia
UK to CN;def-ny-jkl;standard
DE to DM;abc-ab-klm;critical
FD to YM;la-yr-tym;standard
HY to MC;la-yr-ytm;multimedia
GT to KJ;def-ny-jrt;critical
I would like to group... (4 Replies)
Hi,
Please help me to solve sorting in CSV file.
I have 25 columns in my CSV. (Delimiter is ",")
Summary columns are from 10 to 13 which are should not be sorted. From 1-9 and 14-25 should be able to sort in ascending. how should i do this using Sort command in unix.
If no simple commands pls... (0 Replies)
Hi,
I am tryng to read from a csv file and based on some grep command output I will modify one of the column in the same csv.
Example:-
Input CSV:-
20120829001415,noneAA,google.com
20120829001415,dfsafds,google.com
20120829001415,noneAA,google.com
Intermediate Step:- If 2nd column of... (3 Replies)
Hello!
So ive been presented with this comma-delimited file:
I need a print to look as below
"
lastname, phone_number, zip
for every person with a last name starting with the letter H, I
only with a 650-area code phone number. output should be sorted by reverse ZIP code "
I only have... (5 Replies)
Hi All
How all are doing today. Just struck in an issue in Perl
I have a csv file which contain 32 column, I want to make sorting in that csv file with respect to 26th column.
Is it possible to do so without any module being added?
Regards
Aditya
---------- Post updated at 10:02 AM... (11 Replies)
I have absolutaly no idea how to get this script to sort the info in Birthdays.csv by date of birth. I know the sort -n command, however i wish to sort the file birthdays.csv by DOB. How would i go about doing this?
The below script gets user info and date of birth and then puts these info a... (3 Replies)
Hi I am writing a script which has multiple awk statements and each statement gives me a numeric count as an output.
I want those output to be stored in different cells of a csv file.
say 12 awk statements give 12 output and i want them in diffrenet cells of csv file.
Thank you guys..!! (4 Replies)