Search Results

Search: Posts Made By: ddurden7
1,454
Posted By ddurden7
Here is the solution that I used
Here is the solution that I used:

sort file1.txt | uniq -c | sort -n | sed 's/^[ ]*//' > file2.txt

Thanks all
1,454
Posted By ddurden7
Formatting help needed awk or sed maybe
I am executing the following command:
sort file1.txt | uniq -c | sort -n > file2.txt

The problem is that in file 2, I get leading spaces, Like so:
1 N/A|A8MW11
8 N/A|ufwo1
9...
2,095
Posted By ddurden7
Data manipulation/ formatting question
How would I get this output to look

$ cat newfile
13114
84652
84148

LIKE THIS?:

13114,84652,84148

sed,cut awk?
syntax?
2,031
Posted By ddurden7
Specifying and replacing fields with awk
#cat BATCH007.TXT
01,661060052,061000104,081118,0915,07,80,1,2/
99,,,2/

I have this file called BATCH007.TXT. I am trying to change fields 2 and 3 on line 2 to have zeroes. Like this:...
1,929
Posted By ddurden7
Thank You. Both lines work, but what is the...
Thank You. Both lines work, but
what is the purpose of the "-1l " options on the tail, in this command?:

TEST=$(head -2 BATCH007.TXT | tail -1l | awk '{FS=","} {print $2}')
1,929
Posted By ddurden7
awk help needed
How do I alter this command so that it prints only the second comma delimited field from line number 3? Secondly, how do you redirect the output to a variable called TEST?

Thanks

(cat...
2,454
Posted By ddurden7
using variables with sed
I'm trying to get sed to cut and replace using variables, but it doesnt seem to work, when I run this the mod time of the file does get updated. Is my syntax incorrect in the sed command?
Thanks
...
Showing results 1 to 7 of 7

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