Search Results

Search: Posts Made By: Niyati
30,683
Posted By Niyati
Range specification in for loop
Hello Friends,

I want to use range in for loop. For that i used (..) operator but it is not working.

Ex:
for i in 1..24
do
echo $i
done

Instead of printing 1 to 24 nos, it gives o/p as:...
2,992
Posted By Niyati
Starting application using shell scripts
Hi All,

I want to write a shell script which will start some application lets say "Windows media player".

Please let me know your inputs.

Thanks in advance,
Niyati
3,559
Posted By Niyati
Hi Baton, Sometimes single [ doesn't work...
Hi Baton,

Sometimes single [ doesn't work with this many conditions. Normally it works but i have faced issue sometime, so to be on safer side i always use [[ in any condition.
3,559
Posted By Niyati
Hi baton, instead of that try this one: ...
Hi baton,

instead of that try this one:

until [[ (${grade} == 'SSK') || (${grade} == 'HSK') || (${grade} == 'SK') || (${grade} == 'SMSK') || (${grade} == 'UNSK')]]
do
.....(some codes)
done
3,695
Posted By Niyati
For supressing the spaces u can use tr -s '...
For supressing the spaces u can use

tr -s ' '


And if u have both tabs and spaces in ur file u can use awk instead of cut.

for ex:

instead of
cut -f3 -d" "

U can use
awk...
2,702
Posted By Niyati
Hi U have used ' quoutes in for loop, u have to...
Hi
U have used ' quoutes in for loop, u have to use ` thats on left side of key 1 on ur key board. Just try with that because i tried this script it works for me.
2,702
Posted By Niyati
Hi Try the following: for filename in `ls...
Hi
Try the following:
for filename in `ls directory `
do
sed '/098/,$ d' $filename > $filename.1
mv $filename.1 $filename
done
Showing results 1 to 7 of 7

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