AWK → COBOL in C language syntax
Processing input file of Records(Lines, delimeter NEWLINE by default) and each record with many fields (every word separated by delimeter, Space by default)
awk - Shell command
Program is given as first parameter sorrounded by signle quote 'whole program'
Then input file name as second parameter
Output will printed on console
Sample script to create folder with increasing number as suffix. Foldno.sh
#!/bin/bash
TARGET=/home/denso/folder/set0
DNO=$(ls -l $TARGET | grep '^d' | awk 'END{print NR}')
mkdir $TARGET/set_$DNO
mkdir $TARGET/set_$DNO
No comments:
Post a Comment