Sed: assigning its output to a variable.
Kernel 2.6.21.5, GNU/Linux (Slackware 12.0).
Hi: In this script, Code:
semoi@darkstar:~$ cat rename4.sh Code:
$ Input= k3b_audio_0_04 EDIT: I found it: OUTPUT=$(echo $INPUT | sed s/k3b_audio_0_//) |
Code:
semoi@darkstar:~$ cat rename4.sh Code:
OUTPUT=`echo $INPUT | sed s/k3b_audio_0_//` |
Yes. As you can see, I had figured out a way out minutes before you pressed 'Submit Reply'. The second form I'll bear it in mind, and the morals behind it. Thanks a lot.
|
Or in this case you could have just used parameter substitution:
Code:
OUTPUT=${INPUT##*_} |
All times are GMT -5. The time now is 11:23 PM. |