10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I wrote a collection of bash functions years ago and now need to use them again but
I'm getting some error messages when eval tries to expand the variables names.
I recollect that I used the shopt command to set one of the options but I can't quite
remember the command that I... (8 Replies)
Discussion started by: ASGR
2. Shell Programming and Scripting
When I create a newfile, I am using the filename as a variable to create the new filename. When I ouput it, the filename contains the file extension in the middle of the file
My initial approach was to strip it out, now I... (2 Replies)
Discussion started by: dis0wned
3. Shell Programming and Scripting
My OS is Linux (kernel 4.08.something) and AIX (7100-04-01-1543), the used ksh versions are:
ksh88: Version M-11/16/88f (AIX)
ksh93: Version M 93t+ 2009-05-01 (AIX), Version M 93u (Linux)
When writing a parser for stanza files in ksh i encountered a rather strange behavior. Here is a... (4 Replies)
Discussion started by: bakunin
4. Shell Programming and Scripting
I am trying to allow a user to enter in text and then store that text in a variable $gene to run in an awk command in which those values are used to run some calculations. I am getting syntax errors however, when I try. Thank you :).
The awk runs great if it is a pre-defined file that is used,... (7 Replies)
Discussion started by: cmccabe
5. Shell Programming and Scripting
I need some help to setup some environmental variables.
for example...Get A -> userdefined/user input
B -> a number.
c -> system variable...for example $GETCONF PAGE_SIZE
E = do some math using bc
display a message "The value is E"
setup the system/kernel paramter sysctl -p... (3 Replies)
Discussion started by: saravanapandi
6. Shell Programming and Scripting
i have a script which takes input from user, if user gives either Y/y then it should continue, else it should quit by displaying user cancelled.
echo " Enter your choice to continue y/Y OR n/N to quit "
echo " user requested to continue "
##some commands... (7 Replies)
Discussion started by: only4satish
7. Shell Programming and Scripting
I have an issue with awk and variables. I have trawled the internet and forums but can't seem to get the exactt syntax I need.
I have tried using awk -v and all sorts of variations but I have hit a brick wall. I have spent a full day on this and am just going round in circles.
... (3 Replies)
Discussion started by: gazza-o
8. Shell Programming and Scripting
echo "Enter file name of input file list along with absolute path : "
for string in `cat inputFileList`
echo " file does not exist"
From the above code, if the user enters a invalid file... (1 Reply)
Discussion started by: i.srini89
9. Shell Programming and Scripting
I need some help to write a ksh script.
My code so far (pretty bad, sorry):
echo "Calculate average"
while test $UserDecision = y
echo "Enter a number: "
echo "Enter a number: "
echo "Do you want to enter another number?... (2 Replies)
Discussion started by: johnagar
10. UNIX for Dummies Questions & Answers
The following code finds the line containing fruits in test.txt and replaces instances of apple with banana.
ed -s test.txt <<< $'/fruits/s/apple/banana/g\nw'
What I want to do is put variables in the place of fruits, apple and banana.
I have tried replacing ' with " to get... (2 Replies)
Discussion started by: de_la_espada