Search Results

Search: Posts Made By: linux_learner
13,317
Posted By Scrutinizer
Hi linux_learner, sh script means that /bin/sh...
Hi linux_learner, sh script means that /bin/sh will be used to execute the script, overriding any shell that is specified on the first line in the script that starts with #!...
13,317
Posted By Scrutinizer
Right, then that explains it. So you would need...
Right, then that explains it. So you would need to use ./scriptname or bash ./scriptname..
13,317
Posted By methyl
@linux_learner When posting a problem please...
@linux_learner
When posting a problem please state what Operating System and version you are running and what Shell you are using. Every time.
When you have a problem please post the script intact...
13,317
Posted By agama
I cut and pasted your code and it works fine for...
I cut and pasted your code and it works fine for me (reading with -n 1). Is it possible that the version of bash that is being invoked isn't the same one executed as your login shell?

You could...
13,317
Posted By Shirishlnx
Can try this too... # egrep -io "a|e|i|o|u" $1...
Can try this too...
# egrep -io "a|e|i|o|u" $1 | wc -weg.
[root@nagios Shirish@Shukla]# cat my
aa b c d e f g h i j k l m n o p q r s t u v w x y z
[root@nagios Shirish@Shukla]# cat test.sh...
13,317
Posted By alister
I don't see the need for fold since the...
I don't see the need for fold since the complemented tr set will delete non-vowels anyway (including newlines). Also, it looks like your finger slipped off the capslock. ;)

tr -cd aeiouAEIOU <...
13,317
Posted By methyl
Just on the off chance, it's not the same problem...
Just on the off chance, it's not the same problem as before is it?
https://www.unix.com/shell-programming-scripting/177690-running-shell-script-cygwin-terminal.html

Please post the output from...
6,014
Posted By agama
One thing I noticed is that there seems not to be...
One thing I noticed is that there seems not to be a space between the double equal in the test and the "5" (hard to see without code tags).


#!/bin/bash
a=5
[[ "$a" == "5" ]] && echo "true"...
6,014
Posted By Corona688
Are you editing this script with notepad? This...
Are you editing this script with notepad? This will fill the file with garbage carriage returns which the shell will consider as part of shell statements, ruining them. Try 'dos2unix' to fix the...
Showing results 1 to 9 of 9

 
All times are GMT -4. The time now is 03:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy