Search Results

Search: Posts Made By: Nostyx
18,126
Posted By Nostyx
Output bar does it work your end? ...
Output
bar

does it work your end?

once again it works in my TEST directory, but not the real thing. Checked all variables this time...
18,126
Posted By Nostyx
Thanks for the help but that doesn't produce any...
Thanks for the help but that doesn't produce any output for me.

do you not have to -v and assign the shell variable as an awk variable before using it with an awk command?

---------- Post...
18,126
Posted By Nostyx
Thanks for the reply. awk -F: -v...
Thanks for the reply.

awk -F: -v var=${Username} '$0 ~ var {gsub(/foo/,"bar",$2); print}' FILENAME

Changes every instance of foo in the second field into bar, not just on lines starting with...
18,126
Posted By Nostyx
Trouble with passing Variable from bash to awk gsub command
Would really appreciate it if someone could point out my mistake in this line of code, i've been staring blankly at it trying everything i can think of some time now and coming up with nothing.

...
6,586
Posted By Nostyx
Update: $sort -t: -k1 AdditionalInfo >...
Update:

$sort -t: -k1 AdditionalInfo > AdditionalInfo.srt
$sort -t: -k1 /etc/passwd > etcpasswd.srt
$join -t: AdditionalInfo.srt etcpasswd.srt

Joins the matching fields correctly thanks....
6,586
Posted By Nostyx
Bash join script not working
So i'm currently working on a project where I'm attempting to display information of users from the /etc/passwd file and also another information file holding addition information about users.
...
Showing results 1 to 6 of 6

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