Search Results

Search: Posts Made By: max_hammer
4,529
Posted By xoops
sed 's/\( *\)\([0-9][0-9]*$\)/=\2/' inputfile >...
sed 's/\( *\)\([0-9][0-9]*$\)/=\2/' inputfile > outfile
4,529
Posted By pravin27
try this, awk '{$(NF-1)=$(NF-1)"="$NF;$NF=""}1'...
try this,
awk '{$(NF-1)=$(NF-1)"="$NF;$NF=""}1' inputfile
4,702
Posted By ctsgnb
Only partially true : ... Or until you specify...
Only partially true :
... Or until you specify another match number ...

# echo 'ABCDEFG'
ABCDEFG
# echo 'ABCDEFG' | sed 's/././'
.BCDEFG
# echo 'ABCDEFG' | sed 's/././1'
.BCDEFG
# echo...
4,702
Posted By Perderabo
sed's s command only hits the first match unless...
sed's s command only hits the first match unless you add a g flag:

$ echo abc 123 def 456 | sed 's|\([a-z]*\) \([0-9]*\)|\1|'
abc def 456
$ echo abc 123 def 456 | sed 's|\([a-z]*\)...
1,169
Posted By pludi
Quick question here: why not just use cp?
Quick question here: why not just use cp?
961
Posted By ctsgnb
var=$(sed 's/:[^#]*##/...
var=$(sed 's/:[^#]*##/ /g;s/^[^#]*##//;s/:[^:]*$//' infile)or
var=$(awk -v RS="#" -F: 'NF>1{print $1}' infile)
table=$(awk '{for(i=1;i<=NF;i++)if(tolower($i)=="from")if($(i+1)!~/[(]/)print $(i+1)}'...
19,054
Posted By ctsgnb
type=|set a variable called "type" ...
type=|set a variable called "type"
(condition)?<value_if_condition_is_verified>:<value_if_condition_is_not_verified_>|this notation is used to test the value of field $3 :...
10,118
Posted By Scott
Quote the echo to preserve the output: ...
Quote the echo to preserve the output:


echo "`sqlplus ...
...`" | ....

Why do you need to echo what is already output?
6,890
Posted By LivinFree
If you specify . ./file.ksh, it's like running...
If you specify . ./file.ksh, it's like running the contents of that file in your current shell. It's a bit smarter than this, but think of it running:
while read line; do "$line"; done <file.ksh...
6,890
Posted By jlliagre
The "." command is executing the script in the...
The "." command is executing the script in the calling shell (a.k.a. sourcing it) instead of launching a subshell. This explains the differences you observed.
Forum: Tips and Tutorials 08-01-2002
6
58,638
Posted By binhnx2000
Unix Basic Command
A

at : execute commands at a specified time/date.
awk: a scripting language, especially useful for manipulating text and automation.

B
bash : invokes the Bourne Again Shell (standard on...
Showing results 1 to 11 of 11

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