I have a script that is (among other things) doing the following:
With this, i want to choose a file that is located on a server and download it.
the sed lines was given to me on a guy on another forum who said it should do the trick. And it did, somewhat.
In the directory, i have around 40 files.
if i choose 1 - 9, it gives me a list with several lines like this
but if i choose a higher number, it gives me this:
Just as i want it to do.
In this other script that i am working on, i am using the exact same thing, but this time with another directory on the same remote server, where it is only 2 files. (there will be more files there later).
The result is like the first example.
It doesn't cut away all the other lines that i don't want to have there.
Any of you guys who may know what is wrong, or maybe another solution for my problem?
Last edited by noratx; 03-28-2008 at 10:58 PM..
Reason: correcting typos
Hey all
i am pretty new to awk... here my problem.
My input is something like this:
type: NSR client;
name: pegasus;
save set: /, /var, /part, /part/part2, /testpartition,
/foo/bar,... (9 Replies)
hi all,
i'm very new to scripting and have the folllowing issue. I have used a few commands to get a list of numbers, but I need to strip away the non-numeric ones, and then need a total of all values. any ideas?
root@unixserver # cat myfile | awk '{print $8}'| sort -rn
1504
1344
896
704... (2 Replies)
I want to create a temp file which is named based on a search string. The search string may contain spaces or characters that aren't supposed to be used in filenames so I want to strip those out.
My thought was to use 'tr' with but the result is the opposite of what I want:
$ echo "test... (5 Replies)
Hello, I am the CEO of Grand Tech Corporation. We are launching Linux NT and forgive me, but I do not know how to strip binaries down in Mandriva Linux. Can someone tell me a way to?:b: (2 Replies)
Hello,
I was wondering if there was an easy way to take lines from a single-column list, and remove them from a second single-column list. For example, I want to remove the contents of list 1 from list 2. How would I do this?
Contents of list 1:
server1a
server2b
server3c
server4a... (2 Replies)
In this post I came across the cited construct. It works! while ... { list; } does not.
man bash does not mention it (or, better, I didn't see it).
Any reason for / behind this? Am I missing something? (5 Replies)
Hi everyone,
This is an exemple of inpout.txt file (a "," delimited text file which can be open as csv file):
ID, Code, Value, Store SP|01, AABBCDE, 15, 3 SP|01, AABBCDE, 14, 2 SP|01, AABBCDF, 13, 2 SP|01, AABBCDE, 16, 3 SP|02, AABBCED, 15, 2 SP|01, AABBCDF, 12, 3 SP|01, AABBCDD,... (1 Reply)
Hi all,
I didn't use SED for 20 years and was never an expert. So my current knowledge is about zero. Please be patient with me. I'm neither a native speaker.
I have a huge dictionary file and want the rest of the lines stripped. Everything after (and including) the "/" should be stripped. I... (2 Replies)