Search Results

Search: Posts Made By: hexram
1,006
Posted By bartus11
Does it have to be sed?awk...
Does it have to be sed?awk 'NF==1{x=$1}NF==2{$1=x;print}' file
1,190
Posted By bakunin
You can do that: /usr/bin/printf "[%s] %s\n"...
You can do that:

/usr/bin/printf "[%s] %s\n" "$(/usr/bin/date +"<format>")" "$(/usr/bin/df -h /backup | /usr/bin/tail -1)"

See "man date" for suitable format options. Once the output suits you...
1,685
Posted By bakunin
Very true! The shell maintains literally a...
Very true! The shell maintains literally a switch, which flips between "inside quotes" and "outside quotes". Once it encounters a quotation mark, the switch flips into the other position. Per default...
1,685
Posted By Corona688
The short answer is, you cannot put quotes in...
The short answer is, you cannot put quotes in quotes that way directly, the shell won't do that kind of doublethink. You asked for literal quotes, so it gave you literal quotes; making them go away...
4,436
Posted By Chubler_XL
Apologies, this site seem focused on smallest...
Apologies, this site seem focused on smallest number of chars, not clarity.

if(skip != 0 || $2+0 == day + 2) skip=1

# or
if (skip == 0) {
if ($2+0 == day + 2) skip =1
}

if(skip...
Showing results 1 to 5 of 5

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