hi I got the issue
I ran the above code... only one file has been unzipped that is the last file
for this file there is \r \n .. thats y it was processed.
can you help me in removing those hidden characters.
---------- Post updated at 02:09 AM ---------- Previous update was at 02:07 AM ----------
hi thanks a lot. let me try and let you know the results.
thank you very much for helping me..
---------- Post updated at 02:22 AM ---------- Previous update was at 02:09 AM ----------
Many a thanks . Issue resolved.
Can you give some precautions , what things can be done to avoid carriage return characters appended while copying to notepad from unix editor ?
Last edited by Franklin52; 01-21-2014 at 04:24 AM..
Reason: Please use code tags
I read a file (iplist.txt) ine-by-line in a loop which has the list of all the server hostnames.
With each hostname read; I do ssh and fire multiple commands to gather information about that systemas shown below.
#!/bin/bash
while IFS='' read -r line || ]; do
echo "Text read from file:... (3 Replies)
Below is my code:
count=0
if
...
...
else
...
find * -prune -type d | sort -r -n | while read d; do
count=1
if ; then
echo "Count1:$count"
...
...
break 2;
fi
...
done
...
fi
echo "Count2:$count" (9 Replies)
I have a loop like
while read i
do
echo "$i"
.
.
.
done < tms.txt
The tms.txt contians data like
2008-02-03 00:00:00
<space>00:00:00
.
.
.
2010-02-03 10:54:32 (2 Replies)
Hi All,
Following is the program that i have written in cygwin. The redirection of the unfound $param1 to error.txt file doesnt work.Can any one help?
#!/usr/bin/sh
fname=$1
sed 's/ //g' "$fname" > fname1
while read i
do
echo $i > file1
#param1 is script name
... (1 Reply)
Hi everyone.
I wanted to print numbers from 1 to 5 in reverse order. For this I used the following code:
#!/bin/bash
x=5
while
do
echo $x
x=`expr $x - 1`
echo ""
done
echo ""
Well but on compiling the above code, it gives the following error.
... (3 Replies)
i have about 30 .EAR files, every ear file have 1 .JAR file.
so i need to extract .EAR files then extract .JAR files, and one important thing is that every archive must bee extracted to separate folder.
i try with gzip, but when i extract 30 ear files i cant make separate folders.... (1 Reply)
I am unable to access the value set inside the loop from outside loop .
Thought of taking this to forum , I had seen other replies also , where a pipe takes the execution to another shell and mentioned thats the reason we do not get the variable outside loop . But I am getting an issue and I am... (1 Reply)
Hi all,
I want to unpack some files .Files and their sizes are:
1. Linux9i_Disk1.cpio -- 500m
2. Linux9i_Disk2.cpio--- 600m
3.Linux9i_Disk3.cpio---- 250m
I used cpio -idmv Linux9i_Disk1.cpio command to unpack the files. But Its taking more time to unpack the files.What could be the... (2 Replies)
I have a while loop like this
cat ${filename} | while read fileline
do
...
done
I need to access a variable value $newfile inside this while loop
How will i do that?? (6 Replies)