Search Results

Search: Posts Made By: jat
3,402
Posted By bartus11
The easiest solution in my opinion is to add...
The easiest solution in my opinion is to add dummy file at the end:
egrepline="filename1"
egrepline="$egrepline /dev/null"
egrep -n "is" $egrepline
2,871
Posted By itkamaraj
awk '/pattern/{print FILENAME,FNR,$0}' *
awk '/pattern/{print FILENAME,FNR,$0}' *
2,871
Posted By joeyg
what about something like:
$ echo abc 123 the brown dog | sed 's/ /~/1;s/ /~/1' | awk -F"~" '{print $2,":",$1,":",$3'}
123 : abc : the brown dog

You can do two substitutions in one sed command; needed that first.
2,871
Posted By Corona688
You printed 3 columns, ergo you get 3 columns. ...
You printed 3 columns, ergo you get 3 columns.

You can also just put : inside the fields themselves though, and alter individual columns, then print the entire line.

awk '{T=$1; $1=$2" :"; $2=T...
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 12:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy