Am having trouble getting an 'if statement' to play nice..
I am playing with a script and need 'if' to check whether "y" or "Y" has been
entered and if not to exit.
In previous scripts I was playing with there would normally be a Y and a N response
possibility so each response would have their own 'then statement'.
In this case I want to ensure that if neither y or Y is entered that the scriupt exits.
I was hoping to get away with ;
But no dice
I have tried using '-ne' but also no luck, using '!==' results in a binary operator expected error..
Just can' t seem to get it to do what I would like.
Any ideas on how best to get 'if' to confirm that the input is NOT the desired input ?
The problem is in [ "$input" != "y" ] || [ "$input" != "Y" ], it will always true.
if you input y, the second condition is trun, if you input Y, the first condition is trun, if you input N or n or other words, both conditions are true.
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hi
I am trying to figure out what the following line does, I work in ksh88:
] && LIST="$big $LIST"
Not sure what "-a" means in that case.
Thanks a lot for any advice -A (1 Reply)
Hi,
I have a variable, $sername, and I would like to display this variable only if it *does not* contain either of these two tags: *DTI*FA* or *DIFF*FA*.
I think the syntax for my 'or' operator is off. The variable $sername is continuously changing in an outer loop (not shown), but at the... (4 Replies)
Im trying to check if a series of directory exists and if not create them, and am having issues. All the instances of test return with the error "test:
#!/bin/bash
location_Parent=~/Documents/sight_of_sound
location_IMG=~/Documents/Sight_of_sound/IMG
location_AUD=~/Documents/Sight_of_sound/AUD... (4 Replies)
I have a string of commands I am piping some data through and I want to allow command line switches to select which commands are used. I want to do something like this: OPTION="| command3"
command1 -a -b c.txt | command2 -d -e $OPTION >result.txt
I want to do it that way because OPTION may be... (1 Reply)
hi,
I have a problem about the Oracle related components. I'm not able to find any answer yet, and waiting for your responses...
Here is the configuration of my system:
* an IBM P550 machine,
* an AIX 5.3 running on it and
* an oracle database, already installed on it.
The problem (or... (1 Reply)
hi,
I have
* an IBM P550 machine,
* an AIX 5.3 running on it and
* an oracle database, already installed on it.
The problem (or question of my own) is:
Oracle tns listener, "CT_LISTENER", and the enterprise manager (EM) of the instance, which is uniq instance and called... (0 Replies)
Hi All,
I am new to shell scripting and right now I am just limited to using the pre-written scripts. I am in to Infrastructure management where we use different scripts to get the information passed on to the monitoring tools. I am trying to use this script to get the information about the... (2 Replies)
Hello every one,
how are u doing?
my macine has following os:
=====================
Linux 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:19 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
here i am trying to compile a c++ project.i am getting the following error.
error:
=======
Generating... (4 Replies)