Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: vidyadhar85
13,835
Posted By Little
i have changed the way you told and its working...
i have changed the way you told and its working fine..
716
Posted By Don Cragun
This should come close, but the 1st line in the...
This should come close, but the 1st line in the 2nd file will be split into fields using the wrong value for FS (since field splitting will be done before FS is reset). Assuming that there could be...
1,107
Posted By alister
To find words that have at least one double but...
To find words that have at least one double but not more than 3:

sed -n -e '/\(.\)\1/!d; s//&/4; t' -e p

The number can be parameterized with a shell variable.

Regards,
Alister
1,226
Posted By Jotne
This awk gives what OP request awk -F"[: ]+"...
This awk gives what OP request
awk -F"[: ]+" '/newjob/&&f {printf "\n%s",$2} /newjob/&&!f {printf $2;f=1} /command/ {print "~"$3;f=0}' file
abc~a=b+c
bbc~c=r+v
ddc
kkc~c=l+g
mdc
ldc...
953
Posted By Scott
That's not an error, it's a notice. TAR...
That's not an error, it's a notice.

TAR won't add a file with its absolute. That's a good thing that could save your skin one day!
1,339
Posted By alister
The first script is running sed in a subshell...
The first script is running sed in a subshell environment; the second is not. The subshell is a byproduct of the shell's pipeline implementation. The difference is that when $i is incremented in a...
1,622
Posted By Corona688
Putting the too many arguments into find hasn't...
Putting the too many arguments into find hasn't stopped them from being too many arguments. You need to not give them too many arguments.

Let find handle the pattern matching. That way, you only...
1,378
Posted By Chubler_XL
You can achieve it like this: v=$(echo...
You can achieve it like this:

v=$(echo $v|sed -e 's/\//\\\//g')
or
v=`echo $v|sed -e 's/\\//\\\\\//g'`
1,378
Posted By alister
I will only breakdown the first example. From...
I will only breakdown the first example. From that hopefully you'll be able to understand the rest.

There are three levels of parsing in `sed -e "s/\//\\\//g"` which may consider a backslash to be...
Showing results 1 to 9 of 9

 

Featured Tech Videos

All times are GMT -4. The time now is 11:00 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy