1
vote
2answers
31 views

Error: ambiguous redirect while transferring output to command

Output to redirect in script: 511@ubuntu:~/Unix/test$ ls -ltr |awk '{print $9}' default.txt dfah.txt fruit.txt fruit_prices.txt dfh.txt header.txt testfile.txt topoutput.txt Script written on shell ...
0
votes
1answer
65 views

Syntax error in bash script: near unexpected token `else' [closed]

#!/bin/bash input="" echo "Does a wall needs to be sent?" read input if [ $input="yes" ]; then echo "Sending message to all users" echo "" else if [ $input="no"]; then exit fi fi echo ...
1
vote
1answer
32 views

check if genisoimage is succesful

I use a script to convert all VIDEO_TS directories to .ISO. How can I check if genisoimage is actually converting it instead of it failling and converting the next folder? After conversion I have a ...
2
votes
3answers
138 views

Syntax error in shell script

I have this script to divide a file over a 100000 or even more in 50000 lines. desc() { echo ...
1
vote
3answers
4k views

Print given number in reverse order

clear echo "Enter a number" read n sd=0 rev=0 while [ $n -gt 0 ] do sd=$(( $n % 10 )) rev=$(( $rev *\ 10 + $sd )) n=$(( $n / 10 )) done echo "Reverse number of entered digit is $rev" ...