Search Results

Search: Posts Made By: andrejm
9,007
Posted By ahamed101
RealData.txt has \r. Use the below code to...
RealData.txt has \r. Use the below code to replace it with \n

sed -i 's/\r/\n/g' RealData.txt
And then execute the commands we have given!

--ahamed

---------- Post updated at 11:26 AM...
9,007
Posted By durden_tyler
$ $ $ cat f9 DN11-001 Thats the first line...
$
$
$ cat f9
DN11-001 Thats the first line which needs to be
DN11-001 joined with the second line and also to
DN11-001 the third line as they all begin with the same
DN11-001 document number....
9,007
Posted By ltomuno
sed -n 's/DN[0-9]\{2\}-[0-9]\{3\} //p' input|awk...
sed -n 's/DN[0-9]\{2\}-[0-9]\{3\} //p' input|awk '{ORS="";gsub("\\.",".\n\r");print}'
9,007
Posted By ahamed101
Try this... awk...
Try this...

awk '{if(val==$1){gsub(val,"");printf $0}else{if(NR>1)print "";val=$1;printf $0}}END{print ""}' input_file
If in solaris, use nawk.

--ahamed
3,276
Posted By vgersh99
will this do it: sed 's/|.*|/|/g' myFile
will this do it:

sed 's/|.*|/|/g' myFile
5,524
Posted By fpmurphy
sed is not really suitable for decoding an...
sed is not really suitable for decoding an encoded URL string.

Scripting languages such as Perl, Python and Ruby have modules for encoding and decoding URLs.

For example

!/usr/bin/perl
...
5,524
Posted By ctsgnb
sed 's/%[25][0D]/_/g' infile ---------- Post...
sed 's/%[25][0D]/_/g' infile

---------- Post updated at 04:26 PM ---------- Previous update was at 04:25 PM ----------

sed 's/%[25][0B]/_/g' infile
5,524
Posted By posix
Hey try with this echo...
Hey try with this

echo /Users/imac1/Music/iTunes/iTunes 20Media/Music/The%20Rolling%20Stones/Forty%20Licks%20%5BDisc%202%5D/2-13%20Keys%20To%20Your%20Love.mp3 | sed 's/%[0-9]*/_/g'
5,524
Posted By locoroco
Here I have removed the %20: echo...
Here I have removed the %20:
echo /Users/imac1/Music/iTunes/iTunes 20Media/Music/The%20Rolling%20Stones/Forty%20Licks%20%5BDisc%202%5D/2-13%20Keys%20To%20Your%20Love.mp3 | sed 's/%..//g'

output:...
5,524
Posted By ctsgnb
sed 's/%20/_/g' infile or sed...
sed 's/%20/_/g' infile
or
sed 's/[%][0-9][0-9]*/_/g' infile
1,251
Posted By ctsgnb
In the above example, the find is launched for...
In the above example, the find is launched for each and every nodes (not optimal).

So another way that "may" be faster (but ok, it may depends on some other stuff off course) is to generate a big...
1,251
Posted By zaxxon
while read LINE; do find /somefs -inum...
while read LINE; do
find /somefs -inum $LINE -exec rm {} \;
done < inode.list


You could change the rm vs an echo to check if this is what you want. You'll might have to adjust the starting...
Showing results 1 to 12 of 12

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