how to pipeline when the file requires two command line args????
Hiiiiiii!!!!!!!!!
Suppose that there are two files Code:
$ cat abc1 Code:
x1 a1 Any other way to achieve the goal????? ?????????????? |
Quote:
Code:
paste file1 file2 A quick way would be to pipe the paste command to awk maybe?? Code:
paste abc1 abc2 | awk '{print $3, $1}' |
Thanks!!!!!
Now I have one more question. Suppose that I have a file named student.txt Code:
$ cat student.txt Look I just can't use grep because the roll no and the marks may be same. I have to cut it vertically. and then how shall I print the matching line. |
Wouldn't be too quick to cast grep aside as there are plenty of regex options to help you.
How about: grep "^180" student.txt This will return all lines that start ('^' is start of line) with number 180 |
What book or tutorial are you using?
You can use--as a minimum--GREP OR SED. In either case, you want to search for the number at the beginning of the line---all you have to do is add the character for "beginning of line"---"^" example: Code:
sed -n '/^the/p' filename |
All times are GMT -5. The time now is 05:07 AM. |