10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have an input file 'abc.txt' with below text:
I need to paste the first field... (10 Replies)
Discussion started by: mystition
2. Shell Programming and Scripting
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
m1= cat reporting_date.txt
year= expr substr $m1 1 2
m1 has date 10/31/2009
but this vale... (6 Replies)
Discussion started by: jagadeeshn04
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. 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
5. Shell Programming and Scripting
I want to pass variables with the NR function in awk command.
test_file1 is input file having 500 records.
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
6. UNIX for Dummies Questions & Answers
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
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
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
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
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