Search Results

Search: Posts Made By: lmatlebyane
5,558
Posted By lmatlebyane
Thanks, tried all solutions and they all work!
Thanks, tried all solutions and they all work!
5,558
Posted By lmatlebyane
Rename many files
Hi all

I have files in the following format:

01_anote1.pdf
01_bnote1.pdf
01_control1.pdf
01_ethics1.pdf
01_invoice1.pdf
01_invoice_21.pdf
20_quote_l1.pdf


I need to rename them to
...
7,025
Posted By lmatlebyane
Thanks Demwz, with your recommendations I've...
Thanks Demwz, with your recommendations I've fixed all other scripts on other servers.
7,025
Posted By lmatlebyane
Thanks for the answer, you're right, if I put...
Thanks for the answer, you're right, if I put absolute paths for command it works . But, is there something I can do to make it work even if I dont specify absolute paths of commands? Like set...
7,025
Posted By lmatlebyane
cron does not execute script properly
I have a simple script that checks for certain printers and records them to a file.
When I run the script manually at the command prompt, it works perfect, but when I run the script via cron,...
7,010
Posted By lmatlebyane
Thanks all for your help, used xargs <...
Thanks all for your help, used

xargs < testfile | sed 's/ //g'

and it works 100%.
7,010
Posted By lmatlebyane
xargs < testfile | sed -e "s/,$//g" gives...
xargs < testfile | sed -e "s/,$//g" gives correct result but have unwanted spaces in the output:

root@sun6 # xargs < testfile | sed -e "s/,$//g"
string1,string2 ,string3 ,string4
7,010
Posted By lmatlebyane
Seems to be doing what I want, but it also...
Seems to be doing what I want, but it also appends root prompt ?

root@sun6 # tr -s '\n' ',' < testfile
string1,string2,string3,string4,root@sun6 #
7,010
Posted By lmatlebyane
Yes I did, but there's no output: root@sun6...
Yes I did, but there's no output:

root@sun6 # cat testfile
string1,string2
,string3
,string4

root@sun6 #tr -s '\n' ',' < testfile | sed -e "s/,$//g"
root@sun6 #


Thanks

Lucas
7,010
Posted By lmatlebyane
Hi Vino, thanks for the reply. Can you...
Hi Vino, thanks for the reply.

Can you please explain how to use this command? When I try it it returns nothing.

Lucas
7,010
Posted By lmatlebyane
Hi Dhruva Thanks for the solution, it works!...
Hi Dhruva

Thanks for the solution, it works! I have one concern though, your code yields the following result:

string1,string2 ,string3 ,string4

How can I remove the spaces?

Thanks
...
7,010
Posted By lmatlebyane
How to append words at the end of first line
Hi Unix gurus

This is my first post here. I have a file which looks like this:

string1,string2
,string3
,string4
...
...

I need to append all words below first line to the first line,...
Showing results 1 to 12 of 12

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