10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello All;
I have an input file 'abc.txt' with below text:
512345977,213458,100021
512345978,213454,100031
512345979,213452,100051
512345980,213455,100061
512345981,213456,100071
512345982,213456,100091
512345983,213457,100041
512345984,213451,100011
I need to paste the first field... (10 Replies)
Discussion started by: mystition
10 Replies
2. Shell Programming and Scripting
hi
iam trying to extract a certain portion of the string whose value is stored below,but am getting syntax eror.The command is shown below
for file in GMG_BASEL2*.txt
do
m1= cat reporting_date.txt
year= expr substr $m1 1 2
echo $year
done
m1 has date 10/31/2009
but this vale... (6 Replies)
Discussion started by: jagadeeshn04
6 Replies
3. UNIX and Linux Applications
Hi to all! I 'm new in unix programing so... may be I decided a wrong tool to solve the problem but anyway... all road goes to rome jajaja.
My question is: There is any way to print date at the END clause of an AWK script. I mean, I'm writing a tool with AWK and the results are redirected to a... (4 Replies)
Discussion started by: fmeriles
4 Replies
4. Shell Programming and Scripting
i want to get substring of second coloum of an file
using awk substring function.please help me out (2 Replies)
Discussion started by: RahulJoshi
2 Replies
5. Shell Programming and Scripting
Hi
I want to pass variables with the NR function in awk command.
test_file1 is input file having 500 records.
var1=100.
var2=200
awk -F" " 'NR >= $var1 && NR <= $var2' test_file1 > test_file2.
My end result should be that test_file2 should have records from line number between... (2 Replies)
Discussion started by: Nishithinfy
2 Replies
6. UNIX for Dummies Questions & Answers
Hi friends,
I have written a perl code and it works fine but I am not sure tommorow it works or not, please help me.
problem : When diff is 1 then success other than its failure but tomorrow its 20090401 and the enddate is 20090331. thats why I write the code this type but it does not work and... (1 Reply)
Discussion started by: tukuna82
1 Replies
7. Shell Programming and Scripting
The goal:
I have a list of people in teams. The list looks something like this
$1 = Job Position (marketing, IT, PR)
$2 = Name
$3 = Team Name
$4 = Targeted member (somebody in field 2 targets somebody else)
$5 = Employment Status (full time/part time/etc)
The idea is to search through... (2 Replies)
Discussion started by: MaestroRage
2 Replies
8. Shell Programming and Scripting
Hi
I have multiple files that name begins bidb_yyyymm. (yyyymm = current year month of file creation).
What I want to do is look at the files and where yyyymm is older than 1 month I want to remove the file from the server.
I was looking at looping through the files and getting the yyyymm... (2 Replies)
Discussion started by: colesga
2 Replies
9. Shell Programming and Scripting
Hello all...
I have a slight problem in my awk script...
I have a script which checks a csv file and keeps a count of any invalid records and then if it finds any, exits with a code of 1. problem is it dosnt seem to work properly :rolleyes: Everthing seem to work interms of the stats output,... (1 Reply)
Discussion started by: satnamx
1 Replies
10. Shell Programming and Scripting
Hi,
I'm a newbie to UNIX scripting and I'm having some trouble compiling my script. I'm using the Bourne Shell and cannot seem to use the substr function correctly. I'm trying to extract the last two digits of a year that's stored in a variable based off of a condition. I've searched the... (4 Replies)
Discussion started by: E2004
4 Replies