Search Results

Search: Posts Made By: pvar
11,704
Posted By pvar
IFS changing the variable value
Hi,

I have a while read loop that reads files in a directory and process. The files have spaces in between, so I have the IFS=\n to to read the whole line as one file name.

The read works fine...
55,328
Posted By pvar
That worked. Thanks.
That worked. Thanks.
55,328
Posted By pvar
zazzybob's script works fine now. Ygor's...
zazzybob's script works fine now.

Ygor's script still have an issue. It creates seperate output files now but it puts lines starting with DOC & END also in the output files. I just need the data...
55,328
Posted By pvar
Thanks zazzybob and Ygor for your help. But I see...
Thanks zazzybob and Ygor for your help. But I see some problem with each of your scripts.

zazzybob's script - First of all I have a fixed length data file that I need to split. The script creates...
55,328
Posted By pvar
Split file using awk
I am trying to read a file and split the file into multiple files. I need to create new files with different set of lines from the original file. ie, the first output file may contain 10 lines and...
Forum: Linux 07-09-2004
18,525
Posted By pvar
I just want to see(by a a single commad) if there...
I just want to see(by a a single commad) if there is any file starting with those letters present in that directory so that I can do some processing on those files. test -f /home/pv/T20* command...
Forum: Linux 07-08-2004
18,525
Posted By pvar
Linux test command
Hi,

I was trying to test the presence of some files on Red hat Linux enterprise version 2.4.9 using the following command

test -f /home/pv/T20*

I am getting the error, too many parameters,...
1,729
Posted By pvar
Yogr, forget about my previous post. I found out...
Yogr, forget about my previous post. I found out the problem. I didn't mention the field delimiter, I should have given the command like this,

$ awk -F"," -v date=$(date +%m/%d/%y) -f florida.awk...
1,729
Posted By pvar
Take a look at this. This is my awk command file,...
Take a look at this. This is my awk command file, florida.awk

$1 == 1 {
print $0, date
}
$1 != 1 {
print $0
}

and this is how I run the command

$ awk -v date=$(date...
1,729
Posted By pvar
Thank you so much for the reply. Yogr, I...
Thank you so much for the reply.

Yogr, I tried the code from the command prompt and it worked, but I think you could have your scripts in a file and specify -f option in the awk command to run...
1,729
Posted By pvar
awk help
I have 2 questions.
1. Using awk how do I specify two different actions based on the value of the first field on every record in a file.
2. How do I ask awk to output the current date as the last...
14,313
Posted By pvar
Accept user input - only numbers
I have a situation where I want the user to enter only numbers in response to a READ command. I have some validation to restrict the number to be between 1 and 12, but if the user type in some...
Showing results 1 to 12 of 12

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