10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi there,
I'm trying to create a script that will accept multiple inputs by copying and pasting the strings from a notepad, hit Enter key and output the string to a text file.I'm thinking of using the read command however it will just simply get the first line.
Apologies but got no idea how... (7 Replies)
Discussion started by: norbie.lopez
7 Replies
2. Shell Programming and Scripting
Hi all,
I have a script which should take more than 9 command line inputs while running. Likescript.sh a s d f g h j j k l o p i u y t r e w
Now in the script if I have to access one of the input which is at position after 9, in this case say 'p' then how can I do that?
echo $12 will not work... (15 Replies)
Discussion started by: pat_pramod
15 Replies
3. UNIX for Dummies Questions & Answers
I have a unix command that prompts for 'y'. How do I run this from my shell script? (4 Replies)
Discussion started by: Sree10
4 Replies
4. Shell Programming and Scripting
Hi ,
I am not able figure out how to use expect tool to send input to this prompt of format
Searching for disks...done
selecting c0t3d0
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition... (3 Replies)
Discussion started by: chidori
3 Replies
5. UNIX for Dummies Questions & Answers
In cron tab, while scheduling any commands to be run in particular time, is there any level of validation being performed to identify whether the command to be executed is perfectly valid. But AFAIK, it's not being reported even if you schedule a non existing command .say tea abc, Where tea ia a... (3 Replies)
Discussion started by: pandeesh
3 Replies
6. Shell Programming and Scripting
Hello Everybody,
I have a file with data like this
8z:1
15y:0
7x:0
12w:1
...
...
I would like read each line through a loop and will needing to get the input from each line like this
For 8z:1; a=8,b=1
15y:0; a=15,b=0
7x:0; a=7,b=0
Please let me know of a way to... (5 Replies)
Discussion started by: leo.maveriick
5 Replies
7. Shell Programming and Scripting
Hi guys, I have a piece of snippet below which asks the user to input some numbers
if isDatasubEnabled && isReconEnabled; then
echo "1 = CGT, 2 = Subscriber, 3 = Order Monitor, 4 = Revaluations, 5 = Reconciliation, 6 = All, 7 = Exit"
elif isDatasubEnabled &&... (4 Replies)
Discussion started by: pyscho
4 Replies
8. Shell Programming and Scripting
Hi,
I have requirement where record length is stored in an variable RECORD_LENGTH
Code goes as follows
RECORD_LENGTH=537
the above is arrived from
#RECORD_LENGTH=`awk -F"=" '{$sum+=$2} END{print $sum}' DBP_Claims_CFG.ini`
awk '
{
if (length() == '$RECORD_LENGTH')
print FNR, $0... (4 Replies)
Discussion started by: ainuddin
4 Replies
9. Shell Programming and Scripting
I am attempting to use awk to validate the length of each line in a fixed-width raw data file prior to reading in the data. I am happy with....
{if (length() == 403)
print > "valid.file";
else
print > " invalid.file"
}
...to separate out the valid length lines from invalid length... (3 Replies)
Discussion started by: en7smb
3 Replies
10. Shell Programming and Scripting
Hi,
I want to do the following validations in my script when my script gets 2 parameters as command line inputs.
My script expects 2 inputs : a -f option and a filename
If a filename is given as input without the -f option then I have to exit. If only -f option is given and no filename is... (6 Replies)
Discussion started by: sendhilmani123
6 Replies