10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi. I have a piece of code that reads and parses command line options. I'd like to alter it slightly to read from a string (that's set elsewhere in the script) rather than directly from the command line (arg). Can somebody show me how to do this? Many thanks.
My code is as follows:
typeset... (6 Replies)
Discussion started by: user052009
6 Replies
2. Shell Programming and Scripting
Hi
The following code works when reading the arguments from the command line but fails when I try to read from a string. So this works
while ; do
case $1 in
-dbversion) if '`" ]; then { echo "ERROR: missing value for '$1' (seen '$2')"; usage; exit 1; } else { shift;... (6 Replies)
Discussion started by: user052009
6 Replies
3. Shell Programming and Scripting
Hello Community!
Let's say that we have some script which counts its arguments number:
arguments_count.sh:
#!/bin/sh
echo "Number of arguments="$#and some test script:
test.sh:
#!/bin/sh
my_args="1 2 3 '4 5' 6"
echo "Count of arguments when using my_args:"
./arguments_count.sh $my_args... (12 Replies)
Discussion started by: break_da_funk
12 Replies
4. Shell Programming and Scripting
Hi,
I am using awk here.
Inside an awk script, I have a variable which contains a very long XML data in string format (500kb).
I want to pass this data (as argument) to curl command using system function.
But getting Too many arguments error due to length of string data(payloadBlock).
I... (4 Replies)
Discussion started by: cool.aquarian
4 Replies
5. Shell Programming and Scripting
I am passing a list of strings $list and want to remove all entries with --shift=number, --sort=number/number/..., --group=number/number/... Also are removed whether upper or lower case letters are used
For example the following will all be deleted from the list
--shift=12
--shift=2324... (7 Replies)
Discussion started by: kristinu
7 Replies
6. Shell Programming and Scripting
I have an for loop that reads the following file
cat param.cfg
val1:env1:opt1
val2:env2:opt2
val3:env3:opt3
val4:env4:opt4
.
.
The for loop extracts the each line of the file so that at any one point, the value of i is
val1:env1:opt1 etc...
I would like to extract each... (19 Replies)
Discussion started by: goddevil
19 Replies
7. Shell Programming and Scripting
Hi all, I have a requirement where I am taking the first argument as argument name and storing the second argument in argument name as value.
Thanks to ppl here, i learnt to do it.:p
while ( $1 != "" )
set arg = $1
shift
set val = "$1"
echo "set... (2 Replies)
Discussion started by: animesharma
2 Replies
8. Shell Programming and Scripting
Hi Experts,
Help needed on joining one line above & below to the pattern matched string line.
The input file, required output is mentioned below
Input file
ABCD DEFG5 42.0.1-63.38.31
KKKK iokl IP Connection Available
ABCD DEFG5 42.0.1-63.38.31
... (7 Replies)
Discussion started by: krao
7 Replies
9. Shell Programming and Scripting
Hi all,
I have one file that is in the form:
S0243K05_T7_S0243K05_|_BASS2243.C7_K05 groupVI. 88.76
S0137F20_SP6_S0137F20_|_BASS2137d.SPB2.2_C10 groupXXI 88.06
S0056F03_T7_S0056F03_|_BASS256c.C7_C02 groupXIX 85.99
S0056F03_T7_S0056F03_|_BASS256c.C7_C02 groupXIX 83.23... (3 Replies)
Discussion started by: repiv
3 Replies
10. UNIX for Dummies Questions & Answers
Hi guys,
I am a forum (and a bit of a unix) newbie, and I currently have a tricky problem lying ahead of me. I have multiple files, and I am looking to join the files on the first column.
Example:
File 1
andy b 100
amy c 200
amy d 300
File 2
andy c 200
amy c 100
clyde o 50
... (3 Replies)
Discussion started by: jdr0317
3 Replies