Search Results

Search: Posts Made By: Epsilon
20,462
Posted By Epsilon
I meant this: $$ sed...
I meant this:



$$ sed 's/insert/"$STR1"/g' filename
1,953
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.
20,462
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...
20,462
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...
14,314
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,326
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,972
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...
35,408
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,635
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,781
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...
3,249
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,967
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 07:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy