Search Results

Search: Posts Made By: djp
11,308
Posted By djp
Sorry, my mistake, should have been: sed -e...
Sorry, my mistake, should have been:

sed -e "s/args.*acctnum.*/args=XXXXXXXXX\&acctnum=XXXXXXXXX/g"
11,308
Posted By djp
sed -e...
sed -e "s/args.*acctnum.*/args=XXXXXXXXX&acctnum=XXXXXXXXX/g" file > file.out

or

perl -i -pe "s/args.*acctnum.*/args=XXXXXXXXX&acctnum=XXXXXXXXX/g" file
1,978
Posted By djp
Or: echo "QTD GROSS|$(cat abc.txt | cut...
Or:

echo "QTD GROSS|$(cat abc.txt | cut -c1-52)" > out.txt

However, if your file is going to be more than one line, neither of these is going to work. Then you'll need something more like
...
5,801
Posted By djp
Try: if $(grep -q PATTERN ${1})
Try:

if $(grep -q PATTERN ${1})
13,267
Posted By djp
Why not use "ls" instead of "find"? Like ...
Why not use "ls" instead of "find"? Like

for FILE in $(ls -1tr ${LANDING_FILE_DIR}${BTIME_FILENAME_PATTERN1})
do
...
7,280
Posted By djp
if [ "$data_type" = "ASCII" ] || \ [...
if [ "$data_type" = "ASCII" ] || \
[ "$data_type" = "ascii" ]
202,106
Posted By djp
If you have gzip on your system you can use: ...
If you have gzip on your system you can use:

gunzip -S .ZIP filename.ZIP

But it will not extract the file, it will unzip it. No idea what you're going to get if you have multiple files in the...
2,632
Posted By djp
Clean file in single action
What one finds challenging another finds simple...

(HPUX B.11.11)

I have a text file named something like 12345.dst that could look like this:

DOG
CAT
NONE
TEST
CAT

What I want to end...
3,235
Posted By djp
If only I'd waited a little longer before...
If only I'd waited a little longer before displaying my ignorance! :eek:

Seriously, thanks for posting the answer, tmarikle. I've been needing that for awhile and it never occurred to me...
...
88,816
Posted By djp
Just out of curiosity, how would you do that...
Just out of curiosity, how would you do that using sed?

Thanks,
djp
3,235
Posted By djp
The problem here is that the array is populated...
The problem here is that the array is populated based on space-separated items. The only way I know to get around it is to change the spaces to something else and change them back later when you are...
4,630
Posted By djp
Man, I hated asking for something I knew was...
Man, I hated asking for something I knew was going to be that simple but I just couldn't think of it. That works great, I apologize for the interruption... :D
4,630
Posted By djp
How to automate responses
I would have searched for this but I couldn't really think of what to use for the search text...

I've got a situation where I need to automate responses to an executable when running it from a...
4,775
Posted By djp
egrep -e '(AM\||PM\|)' input.txt > output.txt ...
egrep -e '(AM\||PM\|)' input.txt > output.txt

djp
20,946
Posted By djp
Try this: awk -F"$(head -1 test.txt | cut...
Try this:

awk -F"$(head -1 test.txt | cut -c4)" '{print $1}' test.txt

where test.txt is the name of the input file. (Better to supply it in a variable, but I just did this quick for the...
Showing results 1 to 15 of 15

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