10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello I am trying to pull specific columns from an output file that contains spaces and make it a variable.. Here is a piece of the output file and my command:
Host1 UNIX /vol/volume/my stuff
When I pull in the data into my variable the word stuff is left off - I need this as part of my... (10 Replies)
Discussion started by: fmalvest
10 Replies
2. Shell Programming and Scripting
Hello,
I have some problem in inserting the space for the pairs of columns.
I have the input file :
I used this code below in replacing it using space in specific column (replace space in each two columns)
sed -e "s/,/ /2" -e "s/,/ /3" inputfile
Output showed :
However, I have many... (3 Replies)
Discussion started by: awil
3 Replies
3. Shell Programming and Scripting
Hi, I have a file containing this:
testvol1 unix enabled
testvol2 unix enabled
testvol3 unix enabled
testvol3 qtree1 unix enabled
testvol3 qtree2 unix enabled
testvol4 unix enabled
testvol4 qtree1 unix enabled
And I want an output of this:
testvol1... (4 Replies)
Discussion started by: niap21
4 Replies
4. Shell Programming and Scripting
Hi,
I have an output after performing a grep:
FAN
and i did awk '{print $2}' it shows:
is there a way, by using sed that it will only show output as NO_FAULT without the brackets ?
i tried doing sed 's/^*//' but the output is
NO_FAULT] with the ] at the... (12 Replies)
Discussion started by: mosies
12 Replies
5. Shell Programming and Scripting
Hi,
My input is in the following way
a
b
c
d
e
f
I would like to have it printed as
a b c d e f
Any awk scripts are appreciated. (1 Reply)
Discussion started by: jacobs.smith
1 Replies
6. UNIX for Dummies Questions & Answers
dear all,
i have a data looks like this (i have 3000 columns):
rs123 A T T G C C C C C C A A A A A A A A A A A ...
rs154 T T G C C C C C A A A A A A A A A A T T G ...
rs126 A C C C C C A A A A A A A A A A A A T T G ...
I want to remove all the space after the 2nd column and make the... (2 Replies)
Discussion started by: forevertl
2 Replies
7. Shell Programming and Scripting
Hello,
I am newbie in awk. I have just started learning it.
1) I have input file which looks like:
{4812 4009 1602 2756 306} {4814 4010 1603 2757 309} {8116 9362 10779 }
{10779 10121 9193 10963 10908} {1602 2756 306 957 1025} {1603 2757 307}
and so on.....
2) In output:
a)... (10 Replies)
Discussion started by: kajolo
10 Replies
8. HP-UX
Hi,
I am trying to add space after 3rd and 6th column for editing a file in special format. How should I achieve in VI?. So, is it possible to do in it in sed ?
thanks
vipa (1 Reply)
Discussion started by: vipas
1 Replies
9. Shell Programming and Scripting
I have a program that calculates shipping cost for an item and prints the information to a file. I cannot seem to get the lines to print with equal spacing in columns.
I need data like this to be aligned into columns:
Optical Mouse 5 A $25
Compaq Presario 3... (2 Replies)
Discussion started by: turbulence
2 Replies
10. Shell Programming and Scripting
I have a directory of files DATA1,DATA2,DATA3, etc... each file has 1 column of data
Example:
File DATA1
name
date
time
time requested
approved
I need to change these to CSV files so I can import the data. I believe AWK is what i need but I'm new to AWK and can't seem to get the... (5 Replies)
Discussion started by: barrro
5 Replies