Im want to print filename inside loop .. the code im using :-
Filename_1=abc_20090623_2.csv.lk
Filename_2=def_20090623_2.csv.lk
i want to extract filename till .csv eg
Filename_1=abc_20090623_2
Filename_2=def_20090623_2
How can i do this inside the for loop
... (3 Replies)
Hi,
I am unable sum of each column in the loop usng awk command.
Awk is not allowing the parameters in the command.
i am facing the below error.
awk: 0602-562 Field $() is not correct.
Source file
abc.txt
100,200,300,400,500,600,700,800,900
101,201,301,401,501,601,701,801,901
... (1 Reply)
I have the following loop:
for I in `ldm ls |grep -v ^NAME| awk '{print $1}'`
do ldm ls -o network $I | echo $I | tr -s ' ' | cut -f6 -d " " | more +9
I would like the following displayed to a file:
The value of $I, followed by a newline, then the information from the rest of the... (3 Replies)
Hi ,
i want to print the output in line by line
while read LINE
do
echo $LINE | grep UCM | egrep '(Shutdown|Unavailable)'
echo $LINE | grep SRBr | egrep '(Shutdown|Unavailable)'
echo $LINE | grep SRP| egrep '(Shutdown|Unavailable)'
echo $LINE | grep OM | grep JMS|... (7 Replies)
Hi,
i am using a variable tmpVar, using variable data i need implement for loop
tmpVar="abc bbc cbc nbc mbc" # valiable having total number of words= 5 so i need to loop 5 times.
tmpVar="abc bbc cbc nbc mbc"
tmpcnt=`echo $tmpVar|wc -w`
for cnt in 1..$tmpcnt
do
t1=`echo... (4 Replies)
OS : RHEL 6.1
Shell : Bash
I have lots of files in /tmp/stage directory as show below.
Using a loop, I need to print all the filenames in this directory except those ending with a number. How can I do this ?
# pwd
/tmp/stage
#
#
# ls -l *
-rw-r--r--. 1 root root 0 Oct 7 18:38 stmt1... (2 Replies)
In the bash below I am trying to loop through all the R1.gz in a directory (always 1), store them in ARRAY, and cut them before the second _. That is being done but I can't seem to print then one a single line seperated by a space. Is the below the best way or is there a better solution? Thank you... (3 Replies)