10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am having trouble extracting the value in the columns declared in a variable. I have tried several different variation of awk but both give me the column number and not the actual value of that column.
Any suggestions?
Neither of the "extract" variables below are performing as desired
... (5 Replies)
Discussion started by: ncwxpanther
5 Replies
2. Shell Programming and Scripting
Hi have a large spreadsheet which has 4 columns
APM00111803814 server_2 96085 Corp IT Desktop and Apps
APM00111803814 server_2 96085 Corp IT Desktop and Apps
APM00111803814 server_2 96034 Storage Mgmt Team
APM00111803814 server_2 96152 GWP... (6 Replies)
Discussion started by: kieranfoley
6 Replies
3. Shell Programming and Scripting
I have a question that I am at a loss to solve. I have 3 column tab-separated data, such as:
abs nmod+n+n-commitment-n 349.200023
abs nmod+n+n-a-commitment-n 333.306429
abs into+ns-j+vn-pass-rb-divide-v 295.57316
abs nmod+n+ns-commitment-n 182.085018
abs nmod+n+n-pledge-n ... (2 Replies)
Discussion started by: owwow14
2 Replies
4. Shell Programming and Scripting
hi all,
how can i use grep or awk to clean the following input data:
n<>the<>96427210 861521305 123257583
n<>obj<>79634223 861521305 79634223
n<>nmod<>68404733 861521305 68422718
where the desired results is to remove all non-numeric characters?:
96427210 861521305 123257583 ... (5 Replies)
Discussion started by: owwow14
5 Replies
5. Shell Programming and Scripting
Hello,
it would be great if someone can help me with the following:
I want to search for the rows from fileA in column 1 of fileB and output column 2 of fileB if found in fileC. In the moment I search within the complete file. How can I change the code so only column 1 is searched?
cat fileA... (7 Replies)
Discussion started by: Manyaka
7 Replies
6. Shell Programming and Scripting
Hello,
I am trying to redirect files to a directory by using a config file. The config files is as such:
xxxxxx,ID,PathToDirectory
xxxxxx,ID2,PathToDirectory2
and so on...
I have a variable that should match one of these IDs. I want to load this config file into an awk array, and... (2 Replies)
Discussion started by: jrfiol
2 Replies
7. Shell Programming and Scripting
Hi everyone,
Ok here's the scenario.
I have a control file like this.
component1,file1,file2,file3,file4,file5
component2,file1,file2,file3,file4,file5I want to do a while loop here to read all files for each component.
file_count=2
while ]
do
file_name=`cat list.txt | grep... (2 Replies)
Discussion started by: The Gamemaster
2 Replies
8. Shell Programming and Scripting
Hi I'm trying to loop through a small list of id's and then pull out a few columns if the id matches that found in column 2 of the larger file. I managed to get one command to work
awk -F " " '{if ($2 == '154080196') print $2,$3,$4}' tst.txt | less
However, when I try it in a for loop I... (3 Replies)
Discussion started by: flotsam
3 Replies
9. Shell Programming and Scripting
Hello,
Can someone please help me on this.:confused:
I have a file which has more than 1 million lines (XML file).
What I need is:
Search for "abcd" in the input file > output the result into a output.txt (colloum1)
Search for "efghi" in the input file > output the result in to... (3 Replies)
Discussion started by: Needhelp2
3 Replies
10. Shell Programming and Scripting
i want to print the column file using awk or cut in dynamic manner
like
trmp=2;temp1=1;temp3=2
awk 'BEGIN{OFS=IFS="\t"} {print $temp,$temp1,$temp3}' client_data.txt
or cut -f $temp1,$temp2,$temp3 -d"\t" file_name .
but it is showing error , In awk can i use variable as in printing... (36 Replies)
Discussion started by: jambesh
36 Replies