Search Results

Search: Posts Made By: yanglei_fage
1,087
Posted By Don Cragun
The following seems to do what you want: ...
The following seems to do what you want:
#!/bin/ksh
awk -v label="$2" -v key="$1" '
BEGIN { ec = "none"
}
/^Blabla/ {
blabla_found = 1
next
}
blabla_found == 1 {
for(i = 1; i <= NF; i++)...
4,059
Posted By Akshay Hegde
Could be quoting issue akshay@nio:/tmp$ awk...
Could be quoting issue

akshay@nio:/tmp$ awk -F: "/alrm_time/{print $3}" file
alrm_time : 01:51:53

akshay@nio:/tmp$ awk -F: '/alrm_time/{print $3}' file
51


akshay@nio:/tmp$ akshay=123;...
1,180
Posted By CarloM
echo $(eval echo \$${k}) (although using eval...
echo $(eval echo \$${k})
(although using eval is generally frowned upon as it can introduce security holes)
1,178
Posted By delugeag
awk '{if ($0 ~ /abc/) print $2 ; else print}'
awk '{if ($0 ~ /abc/) print $2 ; else print}'
1,178
Posted By vgersh99
if you show a sample file, a desired output and...
if you show a sample file, a desired output and you're getting now, we might be able to help - reading the current 'explanation' is somewhat confusing....
1,165
Posted By raj_saini20
remove " commas from b[1] put arround only "is...
remove " commas from b[1] put arround only "is good" and use b[2] to print bcd
995
Posted By balajesuri
Use double-quotes "cd $dir; ls"
Use double-quotes "cd $dir; ls"
4,863
Posted By in2nix4life
#!/bin/bash echo "$(readlink -f $0)" ...
#!/bin/bash

echo "$(readlink -f $0)"

============

./testme

/tmp/testme
3,567
Posted By agama
If your find supports the wholename option, and...
If your find supports the wholename option, and if your cp supports both --parent and -t then this might do the trick. It works for a small directory that I tested with. (These are two big if's)

...
Showing results 1 to 9 of 9

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