Tagged Questions
0
votes
1answer
292 views
Test variable if its string or not
I'm writing a script which will have some arguments and so I am using getopts
but i want to solve the problem with one argument.
I use a switch, for example -d, and I want the argument for -d will ...
2
votes
4answers
618 views
Can awk use field identifiers also for shell strings (variables)?
Well, this apparently is not possible the way I'm trying it.
This alternate approach to obtain bar as a resulting string works, though:
#!/bin/bash
path1=/usr/tmp/foo/bar/baz
awk -F/ '{print $5}' ...