been messing around with linux for a few months...not too good yet. thinking about taking a class or something, this #### is hard.......anyway, im trying to make an output file using the input from a prompt. heres basically what i have now (random example)
basically, all ive done is set the variable, im trying to figure out how to take that variable and use it in an output file...i am at a loss, been working for like 2 hours, i have tried a few different things, but not the results im looking for.
would really appreciate any tips
Last edited by Corona688; 04-16-2013 at 04:43 PM..
Read up on redirection
sends to screen
sends that to the file called myfile, in append mode
but beware of > as it creates a new file
as in
will leave you only with "goodbye"
I am trying to use awk to create (in this example) 3 seperate text file from the unique id in $1 in file, if it starts with the pattern aa. The contents of each row is used to populate each text file except for $1 which is not needed. It seems I am close but not quite get there. Thank you :).
... (3 Replies)
Dear All,
I am trying to write a Unix Script which fires a sql query. The output of the sql query gives multiple rows. Each row should be saved in a separate Unix File.
The number of rows of sql output can be variable. I am able save all the rows in one file but in separate files.
Any... (14 Replies)
Howdy Folks,
I have a list that looks like this:
(file2.txt)
AAA
BBB
CCC
DDD
and there are 24 of these short words.
I am matching these patterns to another file with 755795 lines (file1.txt).
I have this code for matching:
awk -v f2=file2.txt '
BEGIN {
while(... (2 Replies)
I have a directory where i have *.sas; *.pl;*.sh and *.c scripts
I need to find out what are the child scripts and input output files for each script:
say I have a shell script which calls a perl script and a sas script:
In my first line I want
I a) the parent script name;
b) the... (1 Reply)
Experts,
I am newbie in shell scripting. I want to write Bash shell scripts corresponding to windows bat files. I have installed cygwin at c:\cygwin and i am trying to crate the sh file using vi editor. i am not able to understand how to use linux/unix convention for the code. following is my... (1 Reply)
OS : Linux 2.6.9-67 - Red Hat Enterprise Linux ES release 4
Looking for a script that reads the following log files that gets generated everynight between 2 - 5am
Master_App_20090717.log
Master_App1_20090717.log
Master_App2_20090717.log
Master_App3_20090717.log... (2 Replies)
I need a perl script which will create an output file after comparing two diff file in a directory path:
/export/home/abc/file1
/export/home/abc/file2
File Format: <IP>TAB<DeviceName><TAB>DESCRIPTIONS
file1:
10.1.2.1.3<tab>abc123def<tab>xyz.mm1.ppp.... (2 Replies)
ftp -n -v <<EOF
verbose
open 3.57.40.79
user infodvlp pr0gram
ascii
lcd /home/a501420038/GLA/Success_Load/
cd /ftp/SrcFiles/csg/InstruAsia/
get AU_Success_Log.txt
close
quit
EOF
Please help on this, this gives the out put "AU_Success_Log.txt?" As question mark in the last what will... (1 Reply)
Hello
i need a shell script to create 100 users i am running hp-ux.........
startegy is something like this
craete a shell script
!/bin/ksh
counter=1
while
do
{
useradd usr$counter
passwd usr$counter
# here begins my problem when i say passwd usr$counter
#it again prompts... (9 Replies)