Hi,
I need to parse input file from 2nd line.
Input file contents are,
Code:
ABC123;20100913115432;2000000;NO;
04;AAA;09;DDD;601020304;AAAA;1;OPTA1;OPTA2;;;
04;BBB;09;BBB;601020304;BBBB;0;OPTB1;OPTB2;OPTB3;OPTB4;OPTB5;
04;CCC;09;DDD;601020304;CCCC;1;;;;;
For each line,
1] I need to check number of fields should be 12 and check 7th field value.
Code:
fields=$(IFS=\;; set -- $line; echo $#)
i have 3 files as below:
Code:
[test1][test2][test3]
i want to print 1st,2nd,5th and 10th filed of 1st to 5th lines from each files into a line of an output file, so the result would be:
[output]:
Code:
{line1}(field 1 of line 1 from file 1)(field 2 of line 1 from file 1)(field 5 of line 1 from file 1)(field 10 of line 1 from file 1)...(field 10 of line 5 from file 1)
{line2}(field 1
Say I have a text file, with several lines.
Hi,
I have a file which contains 2,500,500,432 lines.
Can I know what command I should type in order just print out particular line from the input file?
eg. I just wanna to see what is the contents at line 522,484,612.
Thanks for advice.
I would like to write a script that takes something like this:
Line 1
Line 2
Line 3
Line 4
[Blank line]
Line 6
Line 7
Line 8
Line 9
[Blank line]
etc....
And makes it to look like this:
Line 1|Line 2|Line 3|Line 4|[Blank line, if it's easier]
Line 6|Line 7|Line 8|Line 9|[Blank line, if it's easier]
etc.
I would think it would be fairly easy to use two loops, one for the the 5-li
Hi,
I am using the grep function to grep some lines from a text file. However, a line is grepped only once even if it matches the strings in the first file more than once. How can i change the code so that the line gets printed more than once?
Input file 1:
Code:
1 o p
1 a b
2 3 c
5 6 7
Input file 2:
Code:
o a c
Desired Output:
Code:
1 o p
1 a b
2 3 c
Thanks!
I have three files: f1, f2, and f3.
Hi
I want to delete a line from a txt file for which the line number is user input. Say when user selects 19, the 19th line would be deleted from the file. Can anyone please provide me with a sed one liner for the same... I tried sed -i.
I have a script that is working when I input parameters from the command line.