Search Results

Search: Posts Made By: Florinel76
3,278
Posted By
use grep -v "^[ ^I]*#" $1 > $1-strip.bash ...
use

grep -v "^[ ^I]*#" $1 > $1-strip.bash (where ^I represents tab and escape # character if required)

instead of

cat $1 | grep -v "^#" > $1-strip.bash
3,278
Posted By Chubler_XL
Trick here is to process the file 1 character at...
Trick here is to process the file 1 character at a time. Use variables to keep track of being in a single string, double string or comment. Awk probably makes it the easiest

Try something like...
5,225
Posted By ctsgnb
Could be shorten (1 loop , 1 time...
Could be shorten (1 loop , 1 time sum=$(($sum+$num)), 1 break)

#!/bin/bash
sum=0
flag=$#
while :
do
case "$flag" in
0) echo Please enter you numbers \: ; read a ;;
*)...
5,225
Posted By ctsgnb
the synthax of a while loop is for example : ...
the synthax of a while loop is for example :

while [ condition ]
do
<some command>
done
by the way, you should also take a look at the += operator so that you can pass the read value as the...
5,225
Posted By ctsgnb
@jim I have just been told by bakunin not to...
@jim
I have just been told by bakunin not to provide full solution to people in the course/education section ... ;)
5,225
Posted By jim mcnamara
your prof wants a loop I think, for the command...
your prof wants a loop I think, for the command line part.
There is a problem with arguments you need to know
you can reference $1 .. $9 the way I show. More than that and it becomes ${10} ${11}...
Showing results 1 to 6 of 6

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