Search Results

Search: Posts Made By: infyanurag
1,192
Posted By wisecracker
Longhand using CygWin default bash terminal:- ...
Longhand using CygWin default bash terminal:-

(Note I have not bothered to remove the leading newline as that is easy.)
#!/bin/bash
> /tmp/comment
> /tmp/nocomments
ifs_str="$IFS"...
1,192
Posted By Akshay Hegde
$ awk 'gsub(/\/\*.*\*\//,x) + 1' curve.csv
$ awk 'gsub(/\/\*.*\*\//,x) + 1' curve.csv
17,385
Posted By Yoda
Here is a generalized approach for sunday: cal...
Here is a generalized approach for sunday:
cal 5 2013 | /usr/xpg4/bin/awk -v n=2 'NR>2&&!/^ /{if(++c==n) {print $1;exit}}'
Change n variable value as per your requirement.
17,385
Posted By Yoda
cal 5 2013 | awk 'NF==7&&NR>2{print...
cal 5 2013 | awk 'NF==7&&NR>2{print $1;exit}'
17,385
Posted By clx
Try .. cal 12 2012 | awk 'NF==7 &&...
Try ..

cal 12 2012 | awk 'NF==7 && !/^Su/{print $1;exit}'
3,459
Posted By Jotne
This gives 9 which is 2 Saturday. March...
This gives 9 which is 2 Saturday.

March 2013
Su Mo Tu We Th Fr Sa
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

Script...
3,459
Posted By pravin27
cal -m 03 $i_year | awk 'NR==4{print $NF}'
cal -m 03 $i_year | awk 'NR==4{print $NF}'
Showing results 1 to 7 of 7

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