bash - Keep the delimiter in the output of cut -
I have a script which, to remove some code from search, Output this Looks like: I It should look like this: This console should be printed with the I tried, which I thought I could think with Echo, but it does not show any output or gives output: I am running bash 3.00 on Solaris, if he does any help, I would really like KIS. Despite the deduction of something else at the end of the command, and not with the seed or the unit being with the monkey But, if this is the only way, then be it. Try this: cut Uses Path. Something looks like this:
PLACE = $ (grep foo flatfile.txt | cut -d '/' -f 1-6)
machine1: / path / to / where / foo / is machine2: / another / path / to / find / foo
machine1: / path / to / where / foo / is / machine2: / another / path / to / find / foo /
echo "$ PLACE" at the end of the script or some such output will always have at least 2 rows, but usually more.
grep : '/' Is a directory
PLACE = $ (grep foo flatfile .txt | cut -d '/' -f 1-6 | xargs -i "%" echo% /)
Comments
Post a Comment