Search Results

Search: Posts Made By: Tomato
5,273
Posted By Tomato
You can write the variable into a file in the loop
You can write the variable into a file in the loop
2,757
Posted By Tomato
What do you want? Do you want to show file but...
What do you want? Do you want to show file but not directory?
If yes, try this

for file in `ls -lrt * | awk '{print $9}'|grep -v "^d"`
do
if [ -f $file ]; then
echo $file
fi...
2,846
Posted By Tomato
Please delete the bold and highlighted ;;
Please delete the bold and highlighted ;;
2,846
Posted By Tomato
You can extract file extension like this ...
You can extract file extension like this

extension=`expr "$filename" : '.*\(\..*\)'`
2,225
Posted By Tomato
There is a dirty method while read line; do ...
There is a dirty method

while read line; do
$number = `cut -d: -f2 $line | cut -d- -f1`
echo $number
loop << fname
2,883
Posted By Tomato
mahendramahendr is right for example ...
mahendramahendr is right

for example
./test 1 2 3 4 5 6 7 8 9 10 11 12


#!/bin/sh

while [ -n "$1" ];do
echo "$1 $2"
shift 2
done

The output should be
1 2
3 4
5 6
7 8
9 10...
2,883
Posted By Tomato
$1 is the first input parm $2 is the second...
$1 is the first input parm
$2 is the second input parm
You can max input 9 parms $1-$9

You should run the script like this

./test_program file_name folder_name

then file_name will be...
31,346
Posted By Tomato
Can ifconfig help you?
Can ifconfig help you?
Showing results 1 to 8 of 8

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