Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: vgersh99
8,040
Posted By vgersh99
I don't know what "other special characters"...
I don't know what "other special characters" means and I am not csh-savvy, but the following seem to work


#!/bin/csh

set uid = 'jij'
set a = `awk -v v2s="${uid}" '$2==v2s {print $3}'...
8,040
Posted By vgersh99
well, my condolences ;) you can adopt the...
well, my condolences ;)
you can adopt the ksh/bash approach to csh as well...
8,040
Posted By vgersh99
it's not a matterof the shell version. It's a...
it's not a matterof the shell version. It's a matter of using double-quotes when doing var assignment and (more importantly) when echo-ing the variable value.
See my initial response with colored...
8,040
Posted By vgersh99
ok, still no need for grep. val2search='jij'...
ok, still no need for grep.

val2search='jij'

a="$(awk -v v2s="${val2search}" '$2==v2s {print $3}' testfile)"
echo "$a"
8,040
Posted By vgersh99
you probably have a file named Qm6Pnw in the...
you probably have a file named Qm6Pnw in the direfctory you're running these commands in.
try:

a="$(awk '$2=="jij" {print $3}' testfile)"
echo "$a"
Showing results 1 to 5 of 5

 

Featured Tech Videos

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