10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Guys,
I am having a script file where in getting input parameter as string. I need to assign the variable but not able to achieve
#!/bin/bash
input=$1
replace=string_$input_string2
echo $replace
I am getting but should get string_<input_value>_string2
string_ (1 Reply)
Discussion started by: rohit_shinez
1 Replies
2. UNIX for Beginners Questions & Answers
//file begin =====
//some code
task abcd_;
input x;
input y,z; //some comment
output w; //some comment
reg p;
integer q;
begin
//some code
end
endtask : abcd_
//some code
//file end =====
expected output from above... (1 Reply)
Discussion started by: rishifrnds
1 Replies
3. Shell Programming and Scripting
OS version: RHEL 6.7
myTextFile.txt file is referred within Script1.sh script,
I only execute Script1.sh and I want the input variable to be passed inside myTextFile.txt . Any idea how I can do this ?
$ cat script1.sh
cat myTextFile.txt
$ cat myTextFile.txt
$1
Requirement1.... (4 Replies)
Discussion started by: kraljic
4 Replies
4. Shell Programming and Scripting
Hello Forum.
I have the following files in one directory:
abc_july01_2013.txt
abc_july02_2013.txt
abc_july03_2013.txt
abc_july04_2013.txt
abc_july05_2013.txt
abc_july06_2013.txt
abc_july07_2013.txt
abc_july08_2013.txt
If I want to be able to keep the last 5 versions of the file and... (4 Replies)
Discussion started by: pchang
4 Replies
5. Shell Programming and Scripting
Hi all
i need to check that if user has passed any input parameter while executing he shell script like
./test1.sh -a"-v"
then do smothing
if user execute the script without giving input paramater then
./test1.sh
then do something
how can we check this input parameter (6 Replies)
Discussion started by: aishsimplesweet
6 Replies
6. UNIX for Dummies Questions & Answers
hi
I have a shell script say primary.sh . There is a file called params
my scenario is
primary.sh should read all the values and echo it
for example
i should pass like
$primary.sh params
output would be
Abc
... (2 Replies)
Discussion started by: ssuresh1999
2 Replies
7. Shell Programming and Scripting
Hi,
i am new to awk. I am using csv2pipe script(shown below)
BEGIN { FS=SUBSEP; OFS="|" }
{
result = setcsv($0, ",")
print
}
# setcsv(str, sep) - parse CSV (MS specification) input
# str, the string to be parsed. (Most likely $0.)
# sep, the separator between the values.
#
#... (6 Replies)
Discussion started by: bhaskarjha178
6 Replies
8. Shell Programming and Scripting
Hi,
My script takes in one input parameter($1-email id) on the command line...
The script contains something like this...
awk '$1 == 400' abc.log >def.log
mail -s subject $1 <def.log
abc.log looks something like this...
300 222 330 123 445
400 098 890 727 663
How do i make the... (3 Replies)
Discussion started by: wannalearn
3 Replies
9. Shell Programming and Scripting
Hi,
My script expects 2 inputs and one of them is supposed to be time, I would like to check if the given input is in validate format (i.e. 16:00), could anyone help me out here? thanks! (1 Reply)
Discussion started by: mpang_
1 Replies
10. UNIX for Dummies Questions & Answers
Can anyone help me how to write a shell script which accepts input parameter. My requirement is as follows:
I need to run a shell script with a input parameter, and inside the script i will create a file with this input parameter name.
Please help me out to create such a shell script.
... (1 Reply)
Discussion started by: jhmr7
1 Replies