Search Results

Search: Posts Made By: eawedat
1,240
Posted By Corona688
No, that is a useless use of cat...
No, that is a useless use of cat (http://partmaps.org/era/unix/award.html) and dangerous use of backticks (http://partmaps.org/era/unix/award.html#backticks), and doesn't work properly. It will...
1,240
Posted By pamu
Better way you should use this... for...
Better way you should use this...


for line in "$(cat data1)"
do
echo "$line"
done

ello there
nobody says a word
Regards
pamu:)
1,240
Posted By 244an
for line in $(cat data1)...using for x in... is...
for line in $(cat data1)...using for x in... is using values delimited by space, not newline, if you want to use your code as it is you must change the delimiter to newline:
EDIT: IFS seems to be...
1,240
Posted By agama
The input to for is a list of tokens separated by...
The input to for is a list of tokens separated by the characters defined in the internal field seperator (IFS) variable; usually space, tab and newline. For example:


for x in one two three
do...
Forum: Ubuntu 08-30-2011
1,939
Posted By radoulov
Append the command to /etc/rc.local.
Append the command to /etc/rc.local.
63,334
Posted By xbin
set arr=(x y z e f) foreach i ($arr) echo...
set arr=(x y z e f)
foreach i ($arr)
echo $i
end
1,259
Posted By g.pi
@eawedat: I don't know about csh. Most of it...
@eawedat: I don't know about csh. Most of it should also work in ksh.
1,259
Posted By danmero
Sorry, I'm not the one :rolleyes: however you can...
Sorry, I'm not the one :rolleyes: however you can take a look at http://wiki.bash-hackers.org/syntax/pe
1,259
Posted By Aia
${X} is a variable in its full syntax Mask a...
${X} is a variable in its full syntax

Mask a regular expression, taking the less greedy portion, starting from left to right.

e.i.
Match as less as possible, zero or more characters, followed...
1,128
Posted By birei
Hi, Using 'sed'. Redirect output to any...
Hi,

Using 'sed'. Redirect output to any file.

$ cat infile
hey1
hey2
hey3
$ sed '=' infile | sed 'N ; s/\n/./'
1.hey1
2.hey2
3.hey3
Regards,
Birei
1,128
Posted By bartus11
Try: awk '{print NR"."$0}' infile >...
Try: awk '{print NR"."$0}' infile > outfile
Showing results 1 to 11 of 11

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