10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
"ls -tl directory1" will list files to be sorted in mtime, but I don't want to see all the files in each directory, I want to only see output the last line (the oldest mtime) for each directory.
$ ls -tl test1
-rw-r--r-- 1 hce hce 1714397 May 30 2013 b.txt
-rw-r--r-- 1 hce hce 4678 May... (2 Replies)
Discussion started by: hce
2 Replies
2. UNIX for Dummies Questions & Answers
Probably, something really easy to do and stupid to ask help with it, but how to turn a list of numbers into one line of numbers.
I have:
, 116332682
, 116332683
, 116332685
, 116332686
, 116332687
, 116332688
, 116332689
,... (6 Replies)
Discussion started by: Iifa
6 Replies
3. Shell Programming and Scripting
Korn Shell in AIX 6.1
I want to print the below shown pipe (|) separated list line by line.
line=es349889|nhb882309|ts00293|snh03524|bg578835|bg37900|rnh00297|py882201|sg175883
for i in line
do
echo "Hello $line "
done
I wanted to execute the above for loop. But i can't even set the... (3 Replies)
Discussion started by: polavan
3 Replies
4. Shell Programming and Scripting
Hi All
i am cat'ing a file and then using cut to get rid of some info, is there a way to turn the list into one line
i.e
1
2
3
4
5
into
1 2 3 4 5 (4 Replies)
Discussion started by: ab52
4 Replies
5. UNIX for Dummies Questions & Answers
Evening all !
I would like to ask your expertise on how to accomplish the following ;
I have 2 lists, and would like each line from list2 to be appended to each line in list1, resulting in list3 ;
List1;
alpha
beta
charlie
List2;
one
two
three (4 Replies)
Discussion started by: TAPE
4 Replies
6. Shell Programming and Scripting
How do you create lists or arrays in the command line?
And how do you access specific cells of the list? (1 Reply)
Discussion started by: locoroco
1 Replies
7. Shell Programming and Scripting
I want to list my vars in a script so they look like
while read IN
var1
var2
var3
var4
do
echo $IN
done
Then in the same script have them read and processed.
the closest I can get is as follows but this is obviously wrong.
NOTE I want a list not all the entries on one line, that... (5 Replies)
Discussion started by: pobman
5 Replies
8. UNIX and Linux Applications
I am searching a pattern item_id>000111111</item_id> in an XML file.
More than one occurance are there for this patter in a single line.
I have tried
awk '/item_id/,/item_id/' tpnb1.txt>abc.txt
Full lines containg pattern are coming.
I need only list of 000111111. (1 Reply)
Discussion started by: tredev
1 Replies
9. Shell Programming and Scripting
Hi all
i want to list out all command line arguments except $1 i have passed to a script.
Ex: sh cmdline.sh one two three four five
o/p:
two three four five (3 Replies)
Discussion started by: naree
3 Replies
10. UNIX for Dummies Questions & Answers
Hi, this is a pretty intersting problem, I would like to convert a list of words into a concatenated string of words with whitespace between each word.
e.g file list :-
hello
how
are
you
today
convert into
hello how are you today.
What command would I use to do this?
Thanks (2 Replies)
Discussion started by: zulander
2 Replies