Search Results

Search: Posts Made By: loktamann
2,426
Posted By drysdalk
Hi, If you're wanting to print the separate...
Hi,

If you're wanting to print the separate fields of a CSV out one per line, then something like this would work:


$ cat test.csv...
2,426
Posted By vgersh99
echo 'HiringManager_RHMC, DirectSupervisor_RHMC,...
echo 'HiringManager_RHMC, DirectSupervisor_RHMC, ProcessServerReadAccess_ST' | awk -F, '$1=$1' OFS='\n'
2,426
Posted By RudiC
Not sure this works with all tr versions: ...
Not sure this works with all tr versions:


echo "HiringManager_RHMC, DirectSupervisor_RHMC, ProcessServerReadAccess_ST" | tr -s ', ' '\n'
HiringManager_RHMC
DirectSupervisor_RHMC...
6,475
Posted By RudiC
Some sort versions - my is $ sort --version...
Some sort versions - my is

$ sort --version
sort (GNU coreutils) 8.30

- offer the option (man sort)

so it would yield$ sort -M file
Jan 20 16:27:38 2020
Jan 20 16:29:51 2020
Jan 20...
6,475
Posted By Scrutinizer
Using RudiC's suggestion of -M , using GNU sort ...
Using RudiC's suggestion of -M , using GNU sort
sort -k4n -k1,1M -k2,3n file
Would complete the sort.
6,475
Posted By jim mcnamara
To sort dates it works best to convert them to...
To sort dates it works best to convert them to epoch seconds - the number of seconds since Jan 1 970. This code adds an epoch time sorts based on the epoch time, then prints the original minus the...
1,066
Posted By Don Cragun
With problems like this, it is always a good idea...
With problems like this, it is always a good idea to tell us what operating system and shell you're using. And, we need a clearer description of what constitutes a field in your input file and where...
1,066
Posted By disedorgue
Hi, with gnu sed: $ cat /tmp/f2.txt ...
Hi,
with gnu sed:
$ cat /tmp/f2.txt
ACACCTCAT 129 | ACACCTCAT 0
ACACCTCATX 171 | ACACCTCATX 0...
1,300
Posted By RudiC
Please use code tags as required by forum rules! ...
Please use code tags as required by forum rules!

Actually, without those, your request is close to unreadable. Are you lookíng for dn:, or just dn:? For the latter, trysed 's/dn:/\n&/' file

dn:...
3
2,616
Posted By [MA]Flying_Meat
grep has the ability to search for characters at...
grep has the ability to search for characters at the beginning of a line. If you look at the examples section of the man page for grep you'll see it.


grep -v '^0'


should work.
3
2,616
Posted By Scrutinizer
---- @loktamann: ls -ltr does not produce that...
----
@loktamann: ls -ltr does not produce that kind of output. It is important that you state the data sample details accurately, so that forum members do not waste their valuable time.
----


...
1,349
Posted By cjcox
As long as the data matches, folder names, file...
As long as the data matches, folder names, file names across two dirs and you just want the attributes, you might look at ---attributes-only option of GNU cp.
2,257
Posted By RudiC
Please be way more specific, unless awk '/table1...
Please be way more specific, unless awk '/table1 *5/' file2 satisfies you...
2,257
Posted By RavinderSingh13
Your welcome loktamann. Let me show you 2 ways to...
Your welcome loktamann. Let me show you 2 ways to use code tags.
1st: While replying to any post or while opening a new THREAD etc, in TITLE bar you will see a button where it will be written co...
4,755
Posted By Scrutinizer
You can try: perl -pi -e 's/\bprod\b/test/g'
You can try:
perl -pi -e 's/\bprod\b/test/g'
4,755
Posted By RudiC
This highly depends on e.g. the sed version you...
This highly depends on e.g. the sed version you are running. With mine(sed (GNU sed) 4.2.2), this works:
echo "This is a test and only a test for production - prod" | sed -e 's/\<prod\>/test/g'...
2,257
Posted By RudiC
Try an extension to RavinderSingh13's...
Try an extension to RavinderSingh13's proposal:awk 'FNR==NR{A[$1]=$0;next} ($1 in A){print A[$1], $0, A[$1]!=$0?"different":""}' file1 file2
test1 123 test1 111 different
test2 200 test2 200
2,257
Posted By RavinderSingh13
Hello loktamann, Welcome to forums, hope you...
Hello loktamann,

Welcome to forums, hope you will enjoy learning/sharing knowledge/experiences here with us. Request you to please use code tags as per forum rules for codes/Inputs/commands which...
Showing results 1 to 18 of 18

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