Search Results

Search: Posts Made By: Epsilon
19,896
Posted By Epsilon
I meant this: $$ sed...
I meant this:



$$ sed 's/insert/"$STR1"/g' filename
1,626
Posted By Epsilon
can you display a small portion of file u are...
can you display a small portion of file u are talking about...

I meant to see how many fields are there in your file...since you are talking about rows * cols i.e. a table of numbers.
19,896
Posted By Epsilon
the correct format of using the substitution...
the correct format of using the substitution command in sed is:
sed 's/pattern1/pattern2/g' filename

and inside '....' for variable evaluation use "$variable".

I hope the error should not come...
19,896
Posted By Epsilon
also this:
i am agree with Franklin52.You can use any character that is not used in the entire expression for any other purpose as a separator instead of slash /.But there is another way here-
shell can be...
13,562
Posted By Epsilon
try this:
$$ sort -t"." -k 1,1 -k 2,2 -k 3,3 filename



here filename contains hello-0.2.3.tar.gz and all such patterns, one pattern per line.
2,110
Posted By Epsilon
also try this: $$ for var in `paste -s...
also try this:



$$ for var in `paste -s -d " " < file2`
do
head -n +$var < file1 | tail -n -1
done
4,326
Posted By Epsilon
Here is the code:
$$ diff file1 file2 | grep "^> " | cut -c 3- > mismatchfile


---------- Post updated at 02:38 AM ---------- Previous update was at 02:33 AM ----------


$$ diff file1 file2 | grep "^> " | cut...
34,212
Posted By Epsilon
Another way of removing last newline character
$$ C=`wc -c < filename`
$$ D=`tail -c +$C < filename`
$$ if [ $D = $CR ]
then
C=`expr $C - 1`
head -c +$C < filename >filename
fi


This code can be used to traverse a list of filenames in a...
2,182
Posted By Epsilon
Suppose file abc.txt contains: ...
Suppose file abc.txt contains:


Tchampionspsq^@~^@^^^A^@^@^@^A^A^Aÿð^@^@^@^@^@^@^@^@^@^@^A^@^@^@^@^?ð^@^@^@^@^@^@^@?ð^@^@^@^@^@^@pppsq^@~^@#@^@^@^@^@^@^Hw^H^@^@^@^K^@^@^@^@xp^At^@^FTtime2psq^@ ...
1,429
Posted By Epsilon
You can use the following minor modification in...
You can use the following minor modification in your command :

Instead of


$$ tree -d


Use


$$ tree -fi


But this will also displays the directory names in the listing.so to avoid...
2,934
Posted By Epsilon
An easy approach:
You can use the basename command for the same purpose very conveniently.Here is its syntax:

basename <absolute pathname>

It will extract the filename from the absolute path.

Example:


$$...
3,472
Posted By Epsilon
You can also try the following: echo...
You can also try the following:


echo "piece handle=/test123/disk_dump/test123/df0_cntrl_PCPFCI20120404_68498 tag=TAG20120404T180035 comment=NONE" | cut -d " " -f 2 |cut -d "/" -f 5


Output:...
Showing results 1 to 12 of 12

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