Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: Lakris
4,749
Posted By Lakris
Hi, are You sure You don't want to use -f...
Hi,
are You sure You don't want to use -f (field) instead?
for example
cut -d";" -f1,2,3 < file
and so on would give You Your output, including the separators and will also accept fields of...
9,935
Posted By Lakris
Hi, I know You already have an answer, but the...
Hi, I know You already have an answer, but the following could be an alternative, insert where You have
***Some sort of sort function***
It's using the same idea but with other programs.
while...
1,874
Posted By Lakris
;) But all credit should go to where i found...
;)
But all credit should go to where i found it, 10 Steps to Beautiful Shell Scripts (http://bashcurescancer.com/10-steps-to-beautiful-shell-scripts.html) .
A wonderful site that can keep You...
1,874
Posted By Lakris
Hi! I hope this may help, for x in $(seq 1...
Hi!
I hope this may help,

for x in $(seq 1 ${#mystr}) do
eval "echo letter$x=${mystr:$((x-1)):1}"
done

It uses parameter substitution which is very handy when working with...
13,282
Posted By Lakris
Hi, ...and a missing do after the second for. ...
Hi,
...and a missing do after the second for.
Just filling in. :)
And we assume that branch has the value "G2 6"?
And that the second loop contain something else because the variables You set...
Forum: AIX 05-04-2011
2,319
Posted By Lakris
Hi, I agree with previous posts. But I have...
Hi,
I agree with previous posts. But I have found that Xming serves me well, together with Cygwin+bash and "ssh -Y" or Putty with X11 tunneling enabled. The font support has been sufficient. Easy to...
4,693
Posted By Lakris
Hi, I'm not sure about this one because I get...
Hi,
I'm not sure about this one because I get three lines in fileC instead of 2 as You state, but anyway, it may work as a hint:

>fileC
>fileD
while read a b c d date time; do
grep "$a $b $c...
6,161
Posted By Lakris
Hi! This may not be what You want to hear but...
Hi!
This may not be what You want to hear but there are so many stripped down OS-distributions already. Maybe it's part of Your work but I personally wouldn't go through re-inventing the wheel for...
2,201
Posted By Lakris
Hi, do You have one file name per line in the...
Hi, do You have one file name per line in the .txt file and no other text in it?
Something like this would perhaps help, assuming your text file is called 1.txt:

while read filename; do
mv...
754
Posted By Lakris
Hi, The period reads and executes the commands...
Hi,
The period reads and executes the commands in the given file. It is a command, like the sh command. And the file does not need to be executable.

Best regards,
Lakris
Forum: Programming 11-11-2010
4,347
Posted By Lakris
Hi, a fast script solution (but not necessarily...
Hi,
a fast script solution (but not necessarily fast to run) is to search for some key string where the stack starts or ends? If You can specify such a string, is it data from the the top of the...
22,645
Posted By Lakris
Good point, especially if one does other stuff...
Good point, especially if one does other stuff after, that depends on IFS. Embedding it in the while statement is of course the best option.

/L
22,645
Posted By Lakris
Hi, something like this? #!/bin/ksh IFS=, ...
Hi, something like this?

#!/bin/ksh
IFS=,
while read id name attr; do
echo $id
echo $name
echo $attr
done < id-name.lst

Best regards,
Lakris
22,645
Posted By Lakris
Hi all, You could try this , by letting the IFS...
Hi all,
You could try this , by letting the IFS (input field separator) handle the logics for You:

#!/bin/ksh
IFS=,
while read id name; do
echo $id
echo $name
done < id-name.lst


If You...
14,903
Posted By Lakris
Hi, another way is to use the fantastic date...
Hi,
another way is to use the fantastic date command, if perl isn't a requirement, and sh is ok.
Example:
date +%Y-%m-%d -d "2008-01-03 -7 days"
or in Your case,
back_time=$(date +%Y-%m-%d -d...
3,953
Posted By Lakris
Hi, another solution would be to use the...
Hi,
another solution would be to use the tail-function of less, if You have it, which I often recommend as a more flexible alternative. And at least on my machines, the Ctrl-C does not "travel back"...
Forum: IP Networking 10-22-2010
4,459
Posted By Lakris
Great, I ponder to much over my writing and there...
Great, I ponder to much over my writing and there You go finding it all out by Yourself ;)
Yes there's a server mode as well...
Good luck with copying!
/L
Forum: IP Networking 10-22-2010
4,459
Posted By Lakris
Right, fpmurphy, just what I was planning to...
Right, fpmurphy, just what I was planning to point out, given the answers ;)

mgis, Have You examined the options in Kermit? Once You're connected to the host (Linux) with a command line interface,...
Forum: IP Networking 10-22-2010
4,459
Posted By Lakris
Oh my good! ;) Ok, first of all I would...
Oh my good!
;)
Ok, first of all I would strongly suggest any other form of transfer than serial. But it depends on how much You want to transfer, in which direction or whether learning about serial...
2,231
Posted By Lakris
Hi, use the mkdir command. Not sure if I've read...
Hi, use the mkdir command. Not sure if I've read Your tree right but here's a suggestion;

mkdir -p opt{/documents/tmp/backup/etc,/documents/music/work} pictures misc bobsgonlose


best regards,...
3,402
Posted By Lakris
Hi, dd is a tool to basically write the...
Hi,
dd is a tool to basically write the contents of a device, such as a hard disk, byte for byte to a file. And it must be an inactive device (read-only or not mounted at all). And the resulting...
4,012
Posted By Lakris
Hi, I think You can let the date command do the...
Hi, I think You can let the date command do the work for You. If it's a valid date, it will echo the "Cronjob... " line, if it's an invalid date, You will get an error, like


Like this:

echo...
1,000
Posted By Lakris
Hi, I think tee is the way to go. The "-a"...
Hi,
I think tee is the way to go. The "-a" option is the key. Here's an example,

tail /var/log/messages | tee -a messy.log

this will give You stdout to console as well as written to a file.
...
10,084
Posted By Lakris
Hi, it depends on what shell You use, but in...
Hi,
it depends on what shell You use, but in bash, "su - user" alone gives You an interactive shell. But the "-c" option (and some others I think) actively creates a non-interactive shell, because...
Forum: AIX 09-14-2010
2,137
Posted By Lakris
Hi, was the user logged in with ftp before You...
Hi,
was the user logged in with ftp before You made the change to /etc/ftpusers? Restarting the service does not mean that any active connections are stopped. You will have to actively end that...
Showing results 1 to 25 of 310

 

Featured Tech Videos

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