1. Display all the files in current directory sorted by size?
ls -l | grep '^-' | awk '{print $5,$9}' |sort -n|awk '{print $2}'
2. Write a command to search for the file 'map' in the current directory?
find -name map -type f
3. How to display the first 10 characters from each line of a file?
cut -c -10 filename
4. Write a command to remove the first number on all lines that start with "@"?
sed '\,^@, s/[0-9][0-9]*//' < filename
Something about DataStage, DataStage Administration, Job Designing,Developing, DataStage troubleshooting, DataStage Installation & Configuration, ETL, DataWareHousing, DB2, Teradata, Oracle and Scripting.
Showing posts with label awk. Show all posts
Showing posts with label awk. Show all posts
Tuesday, June 10, 2014
Subscribe to:
Posts
(
Atom
)