![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Awk help
Hi all,
I cut specific cell(row=2, column=1) in my excel file and created new file using following script. awk -F"," 'NR ==2 {print $1}' file1.csv > file1_new.csv awk -F"," 'NR ==2 {print $1}' file2.csv > file2_new.csv and so on.... The problem is that I have thousand files and I have to do the same procedure thousand times. How can I make this simple using loop command? Thanks in advance. |
|
||||
|
Quote:
Code:
...
awk -F"," 'NR==2 {print $1}' ${file} > ${file%.*}_new.cvs
...
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|