10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello:
I have some text output, on SunOS 5.11 platform using KSH:
I am trying to parse out each string within the () for each line.
I tried, as example:
perl -lanF"" -e 'print "$F $F $F $F $F $F"'
But for some reason, the output gets all garbled after the the first fields.... (8 Replies)
Discussion started by: gilgamesh
8 Replies
2. Shell Programming and Scripting
Hello All,
While searching for the question, I found some answers but my implementation is not giving expected output.
I have two files; one is sourcefile, other is named template.
What I want to do is to search each line in template, when found all columns, cut the matching line from source... (4 Replies)
Discussion started by: baris35
4 Replies
3. Shell Programming and Scripting
I am executing df -mP to see the disk utilization.
I would like to append servername also to each and every line.
df -mP | awk '{ print $1","$2","$3","$4","$5","$6 }'
trying to add something like this
df -mP | awk '{ print $1","$2","$3","$4","$5","$6","$hostname }' ... (1 Reply)
Discussion started by: lazydev
1 Replies
4. Shell Programming and Scripting
Hi Friends,
I have a file1
i want to retrieve only the fields which have DEP,CITY,TRANS as headers in other file.
Output:
I want to give the input as DEP,CITY,TRANS column names to get the output.
i used cut command .. but if i have 300 fileds it is more difficult to... (4 Replies)
Discussion started by: i150371485
4 Replies
5. Shell Programming and Scripting
hello everyone !
i face the following problem as i use sed to ignore some columns of an output.
the command i use is
sed 's/^\(*\) \(*\).*/\1 \2/'
as i only want the 2 first columns the command finger returns
the problem is that for some lines the results are fine but for other lines... (8 Replies)
Discussion started by: vlm
8 Replies
6. Shell Programming and Scripting
Hi
Description of input file I have:
-------------------------
1) CSV with double quotes for string fields.
2) Some string fields have Comma as part of field value.
3) Have Duplicate lines
4) Have 200 columns/fields
5) File size is more than 10GB
Description of output file I need:... (4 Replies)
Discussion started by: krishnix
4 Replies
7. Shell Programming and Scripting
HI,
I have a file like below
"103865","103835","Zming","","Zhu","103965","Sunnyvale","US",
"116228","116227","Morlla","","Kowalski","113228","Paese "(Treviso)""IT"
I want to validate the 7th column which is below.
"Sunnyvale"
"Paese
In the above 7th column Paese is not ended with... (9 Replies)
Discussion started by: Krrishv
9 Replies
8. Shell Programming and Scripting
Hi,
I'm using awk in HP-UX machine which does not support systime(), strftime(). So to get the date time I was using :
seq 1 100000 | awk ' "date +%Y%m%d%H%M%s" | getline curtime; print curtime }'
However the above code gets the date only once, next time it is not updated. For... (2 Replies)
Discussion started by: Random_Net
2 Replies
9. UNIX for Dummies Questions & Answers
Hi,
Let's say that I have a file called table, I know that if I need to see a the second column for exampls I use:
awk ' {print $2}' table.txt
Is there anyway to use awk to actually cut a column and put it somewhere else in the table?:confused: (8 Replies)
Discussion started by: cosmologist
8 Replies
10. Shell Programming and Scripting
Hi
I have the input file as below
***TEST10067
00567GROSZ 099
00567CTCTSDS90
***TEST20081
08233GROZWEWE
00782GWERW899
***TEST30088
08233GROZWEWE
00782GWERW899
I am finding the lines starting with *** and outputing as below
TEST10067
TEST20081
TEST30088
I need a space between TEST1... (9 Replies)
Discussion started by: dhanamurthy
9 Replies