Search Results

Search: Posts Made By: nss280
10,904
Posted By nss280
Hi RudiC, During the UT phase, I have a manual...
Hi RudiC,
During the UT phase, I have a manual run on the script. Once success, I will be passing parameters obtained from another script to call this one. I am going to use the case statement in...
10,904
Posted By nss280
Got that. Also while I was trying the read...
Got that. Also while I was trying the read command it works well for almost all characters including ?. But it didn't work for *. It showed the list of files in the current directory. Can you please...
10,904
Posted By nss280
Thankyou Scrutinize. It worked, I have one...
Thankyou Scrutinize. It worked, I have one question here. I am going to call this script from a cron. As of now in my cron, I have been usingsh /..... to execute it. So this time should I used bash...
10,904
Posted By nss280
Read -s -n not working
Hi All,

Using bash.
I am trying to accept one char input for my code.
The user is suppose to enter d(disburse) or g(garner).

I am stuck with read command. It works for me on the command...
2,610
Posted By nss280
I used sh -x as advised. Took sometime but was...
I used sh -x as advised. Took sometime but was able to debug successfully.

Thanks Alister. Btw, your comment about the lack of double quotes really helped. It helped me fixed quite many issues...
2,610
Posted By nss280
Hi Wisecracker, I must say that was a wonderful...
Hi Wisecracker, I must say that was a wonderful catch.


$ vi prog11.sh
"prog11.sh" 23 lines, 639 characters
echo "Enter file name"
read FILENAME=$1
linecount=0
charcount=0
n=0...
2,610
Posted By nss280
Hi Alister, Thank you for the quick reply. I...
Hi Alister,

Thank you for the quick reply. I tried as you suggested but still its showing me the same error


$ vi prog11.sh
"prog11.sh" 22 lines, 646 characters
echo "Enter file name"
read...
2,610
Posted By nss280
Logical if error
Hi All,

I am writing a simple script to read a file and display the lines with char count between 20 and 25. I am stuck with the if condition here. Tried a lot but still getting an error on the if...
2,531
Posted By nss280
Issue with Error handling,not able to continue the script further
Hi,

I am trying to write a script to cleanup files in a log directory ..


cd log
find Datk*[0-9]* -mtime +7 -exec rm -f {} \; 2> /dev/null



Have used the above to clean up files in log...
4,287
Posted By nss280
That works !! El perfecto !!!!!!!!!!!!!!!!!! ...
That works !!
El perfecto !!!!!!!!!!!!!!!!!!

I spent almost half hr trying to fix this !!!!!!!!!!!!!

muchas gracias Frank:)
4,287
Posted By nss280
issue with multiple logical operators
Hi,
shell is /bin/ksh

I am trying to do the following in my code.. but its showing me an error



if [[ [[ "$ida" == "_W_" || "$ida" == "_SA" ]] && [[ "$chk_dy" == "Sun" || "$chk_dy" == "Sat"...
70,734
Posted By nss280
Thank you Very much Curleb, for that detailed...
Thank you Very much Curleb, for that detailed explanation and info. I should be going with tail. That will solve my purpose..
Also thank you Reebot and Methyl for your answers ..

Many Thanks &...
70,734
Posted By nss280
Thank you Reebot ! But any faster operation...
Thank you Reebot !

But any faster operation then tail that can help out here ???
70,734
Posted By nss280
retain last 1000 line in a file
I have large file with around 100k+ lines. I wanted to retain only the last 100 lines in that file. One way i thought was using

tail -1000 filename > filename1
mv filename1 filename


But...
3,410
Posted By nss280
Thank you , I did the following: for file in...
Thank you , I did the following:

for file in *_X7_*
do
awk '{print $0"|||||||"}' $file> output
mv output $file
done


for file in *_X3_*
do
awk '{print $0"|||||||"}' $file>...
3,410
Posted By nss280
Filename pattern match and appending pipe
Hi,

I have a directory with around 100k files and files with varying sizes(10GB files to as low as 5KB). All the files are having pipe dilimited records.

I need to append 7 pipes to the end of...
11,136
Posted By nss280
That works perfectly... :) thanks a lot.... ...
That works perfectly... :) thanks a lot....

First the shell is ksh

Now please let me tell you why I need to do this....
This is what is happening......
dev$ wc -l abc_
236 abc_
dev$ head...
11,136
Posted By nss280
Wierd issue using wc -l in a script
Hi experts,
This is what Im doing...

file_cnt=`cat abc_ | wc -l`
head -$file_cnt abc > abc_2

if [ "$?" != "0" ]; then
error "failed on rename abc_ > abc_2"
exit 1
fi


try_run...
Showing results 1 to 18 of 18

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