Search Results

Search: Posts Made By: ddreggors
2,468
Posted By ddreggors
echo ""|awk "{a=${JUMBO}; printf \"%f\n\", a}" ...
echo ""|awk "{a=${JUMBO}; printf \"%f\n\", a}"

---------- Post updated at 03:14 AM ---------- Previous update was at 01:14 AM ----------

or if you prefer this way:


$ echo "$JUMBO" |awk...
3,511
Posted By ddreggors
make sure that "file1.txt" is changed to point to...
make sure that "file1.txt" is changed to point to a files that has 89 columns.

I tested it and it works fine here with 89 columns, given column 1 is the id, column 6 is the Chr data, column 88 is...
1,253
Posted By ddreggors
Command: sed...
Command:

sed 's/\(AA_\)\(Name.*\)/\1\2\n\1NEW_\2/;s/\(AA_\)\(Address.*\)/\1\2\n\1NEW_\2/;s/\(AA_\)\(Telephone.*\)/\1\2\n\1NEW_\2/' import.txt


Results:

AA_IDNo=IDNoHere
AA_Name=NameHere...
3,511
Posted By ddreggors
I found the issue. See my above comment... I...
I found the issue.
See my above comment... I updated it to show what I did.

---------- Post updated at 04:09 PM ---------- Previous update was at 03:31 PM ----------

Actually, now that we have...
9
6,925
Posted By ddreggors
Thanks again Scrutinizer! awk 'NR==FNR...
Thanks again Scrutinizer!


awk 'NR==FNR {A[$1];next} {if ($2 in A) print $1}' file2 file1
1
3
10,223
Posted By ddreggors
simple for awk to do this... $ awk -F,...
simple for awk to do this...



$ awk -F, '{print $2 "," $1}' InFile.csv
'ColumnB','ColumnA'
'A2','A1'
'B2','B1'
'C2','C1'
12,798
Posted By ddreggors
Since the OP was asking about exit status's in...
Since the OP was asking about exit status's in regards to child processes... I thought I would add this.


Consider two shell scripts, parent and child:

PARENT (test-parent.sh):

#!/bin/sh
...
1,445
Posted By ddreggors
sed 's/\.txt/\.1cdb\.txt/' infile > outfile ...
sed 's/\.txt/\.1cdb\.txt/' infile > outfile


or if you prefer to remove the need for a temp file (outfile):


sed -i 's/\.txt/\.1cdb\.txt/' infile


You can even do a pretest and print to...
24,741
Posted By ddreggors
+1 @ sed 's/\[.*\]//' file_name You beat me...
+1 @ sed 's/\[.*\]//' file_name

You beat me to it lol.

I was in the reply screen and saw your post but it was not in the thread when I hit reply.
3,903
Posted By ddreggors
nice awk solution but OP asked for sed: ...
nice awk solution but OP asked for sed:


echo "www.google.com/sample.log" |sed -r 's/(.*)\/(.*)/\1\/\2 \1 \2/g'
Explaination:

Breaking this sed line down we have 4 main parts.

1. The sed...
2,823
Posted By ddreggors
oops yep I was wrong there. I oddly missed...
oops yep I was wrong there.

I oddly missed that '/' was the deliminating character for the regex pattern and therefore the p on the other side was actually a sed command.
I guess the '|/' threw...
Showing results 1 to 11 of 11

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