Skip to main content

Thread: starting whit scripting


i want make script , have no experience it..
have number of (.jpg) files in directory , want few commands first file in directory. have:

r= ls -1 | head -1
echo $r

not working. when try first command output name of file. when try second command get: ls -1 | head -1 , not name of first file.

help?

i have found it..

r=$(ls -1 | head -1)


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [all variants] starting whit scripting


Ubuntu

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account