Can anyone give me a hand with some questions by e-mailing me directly, so I can relay the questions inorder. I really would appreciate anyone that can help.
Thank You in advance, I am online and will reply instantly.
Emails outside of the forum defeat the purpose of UNIX.com. Knowledge discussed outside of the forum doesn't allow everyone to benefit and fails to build the knowledge base. Your questions is not appropriate, please post your question instead of asking for one-on-one help.
Keith
////////////////////////////////////////////////////////////////////////////////////////////////////
Ok,
The site gave me some light to see how I can make this work.
Just one thing can you give me an example of how I can run a program that
asked the user for input to sort the items?
Charley
////////////////////////////////////////////////////////////////////////////////////////////////////
nawk is more robust than awk and has some functions like readline etc.
You could also use shell for user interaction and pass the variable into
the awk script - just a crude example: added code tags for readability --oombera
Sounds like this may be a more appropriate question for your teacher...I'm sure if you use the Search function of this website you'll come up with something. If it's not homework, can you be more specfic as to what your needs are?
I am working to learn basic unix command such as Roster Phonelist, and simple problems since that is the system I have to use right now while I am working overseas. These are sample examples that I can use for better understanding of the syntax.
Hi,
I have identified how to use command chaining as per below on a file, to capture the header of a file, as well as the line containing the C: drive.
$ cat test.txt
Filesystem Size Used Avail Use% Mounted on
rootfs 237G 153G 84G 65% /
none 237G 153G 84G ... (6 Replies)
Hi All,
I have 2 pipe delimited files viz., file_old and file_new. I'm trying to compare these 2 files, and extract all the different rows between them into a new_file.
comm -3 < sort file_old < sort file_new > new_file
I am getting the below error:
-ksh: sort: cannot open
But if I do... (7 Replies)
Hi Experts,
I have a filelist collected from another server , now want to sort the output using date/time stamp filed.
- Filed 6, 7,8 are showing the date/time/stamp.
Here is the input:
#----------------------------------------------------------------------
-rw------- 1 root ... (3 Replies)
Input file:
100%ABC2 3.44E-12 USA
A2M%H02579 0E0 UK
100%ABC2 5.34E-8 UK
100%ABC2 3.25E-12 USA
A2M%H02579 5E-45 UK
Output file:
100%ABC2 3.44E-12 USA
100%ABC2 3.25E-12 USA
100%ABC2 5.34E-8 UK
A2M%H02579 0E0 UK
A2M%H02579 5E-45 UK
Code try:
sort -k1,1 -g -k2 -r input.txt... (2 Replies)
Hello all -
I am to this forum and fairly new in learning unix and finding some difficulty in preparing a small shell script. I am trying to make script to sort all the files given by user as input (either the exact full name of the file or say the files matching the criteria like all files... (3 Replies)
Hi to all.
I'm trying to sort this with the Unix command sort.
user1:12345678:3.5:2.5:8:1:2:3
user2:12345679:4.5:3.5:8:1:3:2
user3:12345687:5.5:2.5:6:1:3:2
user4:12345670:5.5:2.5:5:3:2:1
user5:12345671:2.5:5.5:7:2:3:1
I need to get this:
user3:12345687:5.5:2.5:6:1:3:2... (7 Replies)
I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config.
I am not sure if I can do this with BASH scripting.
I have set up password less login by adding my public key to authorized_keys file, it works.
I am a little... (1 Reply)
Hello,
I am trying, utilizing the few commands I know, to extract all records within my file that were generated in November of 2007. Each record within the file has a "date" field giving the month, day, and year (9-8-88). How do I extract those records to their own file?
Once I extract... (4 Replies)
Hi,
I need to get five names as input and sort it. It has to be done in the command level only. It should not read from any files.
I tried with many combinations. I didnt get it.
I can able to get the input using
cat > sample
jik
njvi
abifj
...like this and i dont know how to sort... (4 Replies)
Hello all,
i've written a small piece of code that will read commands from standard input and executes the commands.
Its working fine and is execting the commands well. Accepting arguments too. e.g
#mkdir <name of the directory>
The problem is that its not letting me change the directory i.e... (4 Replies)