Search Results

Search: Posts Made By: vino_hymi
1,380
Posted By Corona688
A modern shell will let you dereference a string...
A modern shell will let you dereference a string with ${!...}

You must assign the string first, you can't embed the string inside the {}

STR="${MONTH}_${DAY}_${YEAR}"

echo "${!STR}"
11,703
Posted By rangarasan
bash
Hi,

You can do little bit modification from balajesuri's post


#! /bin/bash

CMD=$1
ARGS=${*:2:$#}

echo $CMD
echo $ARGS


Cheers,
Ranga:)
11,703
Posted By balajesuri
You should've been clear with the requirements....
You should've been clear with the requirements. When you say from $2 to $n, it could mean from 2nd param to 6th param out of 10 params, right?

#! /bin/bash
CMD=$1
shift
ARGS=$*
echo $ARGS
11,703
Posted By itkamaraj
#!/bin/bash count=0 for i in `echo $@` do ...
#!/bin/bash
count=0
for i in `echo $@`
do
[ "$count" != "0" ] && ARGS="$ARGS $i"
count=1
done
echo $ARGS
2,454
Posted By michaelrozar17
can you post your execution line..? sed...
can you post your execution line..?
sed "0,/$searchenv/s//&\n$appendenv/" inputfile > outfile
2,454
Posted By michaelrozar17
forward slash need to be escaped.. sed '0,/<a...
forward slash need to be escaped..
sed '0,/<a class="string-array">/s//&\n<string>java<\/string>/' inputfile > outfile
1,247
Posted By methyl
Something to get you started. We can read the...
Something to get you started. We can read the file and convert each comma to a newline.
Assming this is a Bourne-type shell.

cat filename.csv | tr ',' '\n' | while read parameter
do
...
Showing results 1 to 7 of 7

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