Search Results

Search: Posts Made By: demet8
13,364
Posted By Yoda
1. Create a script file: make_copy.sh:- cat...
1. Create a script file: make_copy.sh:-

cat > make_copy.sh
file_name="/home/field1"
cp ${file_name} ${file_name}.bak

2. Run the script file: make_copy.sh:-

chmod +x make_copy.sh...
5,054
Posted By Don Cragun
You're right. I'm not doing well today... Once...
You're right. I'm not doing well today... Once more:
5,054
Posted By bartus11
Try running that code on a bit modified...
Try running that code on a bit modified input:Mark Jacobs 01
Mark Davis 03
Kerry Wild 05
Parker Jacobs 08
Adam Jacobs 08Notice where "Adam" is placed.
5,054
Posted By Don Cragun
I must be missing something very basic here. ...
I must be missing something very basic here. Assuming that the first field in your input file is the first name and the second field in your input file is the last name, why isn't:
sort -k2...
5,054
Posted By bartus11
To pipe the output to another file: awk '{print...
To pipe the output to another file: awk '{print $2}' filename | sort | uniq | while read last_name; do awk -vn=$last_name '$2==n' filename | sort -k1; done > first_last
5,054
Posted By bartus11
I think it can't be achieved with single sort...
I think it can't be achieved with single sort run. This works, but I don't know if it is not too complicated for your course. Anyway here it is: awk '{print $2}' filename | sort | uniq | while read...
Showing results 1 to 6 of 6

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