Search Results

Search: Posts Made By: GmGeubt
1,536
Posted By slak0
Perhaps you could use: bash-4.1$ str="a0=bus...
Perhaps you could use:
bash-4.1$ str="a0=bus a1=car a2=truck"
bash-4.1$ nustr=`echo $str | sed "s/a.=//g"`
bash-4.1$ echo $nustr

I think the problem of occurrence is the use of the "^".
12,080
Posted By CarloM
sed 's/\(\.[0-9][0-9]\).*$/\1/g' EDIT:...
sed 's/\(\.[0-9][0-9]\).*$/\1/g'

EDIT: Missed a backslash
2,025
Posted By ieth0
so if the command1 is : grep $1 $p|sed...
so if the command1 is :
grep $1 $p|sed s/.*=.//|sed 's/<.*//'
and command2 is :
grep "$*" $q|cut -c77-78
and you want to grep the command1's result in command2:
grep "`grep $1 $p|sed...
2,829
Posted By ahamed101
Well, I think this is all you need! ...
Well, I think this is all you need!

#!/bin/bash
grep "$*" input_file
Right?

Initially I thought you wanted to have each argument as the search element.

--ahamed
Showing results 1 to 4 of 4

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