Hi,
Is it possible to accept a filename as command line parameter and then write to that file using command redirection? i tried the below script.
outputfile=`echo $1`
echo "Writing to file" > 'echo $outputfile'
exit $returncode
but it isnt working. is there any other way to... (9 Replies)
hi
i have a file contains data
Line timeout:
START->SIGNON_REPLY,
SIGNON_REPLY->SIGNON,
Received SOT req
SOT request:
SIGNON->SOT_REPLY,
SOT_REPLY->DATA_RECEIVE,
DATA_RECEIVE->EOD,
i need to write into one line , separated by commas
please help
thanks
Satya (2 Replies)
Hi,
I'm reading and writing a line from one file to another.
Input line is like this:
My name is David. Working on a shell script now.
When I use "echo" or "print" output comes like this,
My name is David. Working on a shell script now.
Sample... (7 Replies)
I need to write value of variable $version at a particular line in a text file.
Line number is determined by another variable &line......I don't know how to do it in shell script ... (2 Replies)
Hi,
I have to write s script to check an input file for invalid characters. In this script I have to find the exact line of the invalid character. If the input file contain 2 invalid character sat line 10 and 17, the script will show the value 10 and 17. Any help is appreciated. (3 Replies)
Dear All,
I have a question that's been difficult to get an answer to.
I often write command line loops, e.g. find files, print name, grep for term, apply sed, etc
I use both zsh and bash.
When I write a loop e.g.
for line in `more myfile.txt`
> do
> echo $line
> done
but... (2 Replies)
Given a particular line number and a corresponding column number, can i write something in the file during run time?
For example x=1 and during runtime i want to write the value of x in column 100 of every line of a given file, then how shud that be done?
Thanks (9 Replies)
Hi,
I have one input file with the following content:
MY_inpfile.txt
Aname1 Cname1 Cname2 1808 5
Aname2 Cname1 1802 47
Bname1 ? 1819 22
Bname2 Cname1 1784 11
Bname3 1817 9
Zname1 Cname1 1805 59
Zname2 Cname1 Cname2 Cname3 1797 27
Every line in my input file have a 4 digit... (5 Replies)
Hello
I am facing a very unique problem and not able to understand why. I have written a function which will check header of the file. If header is present good else it will write the header on top
def writeHeaderOutputCSV(fileName):
# See if the file exist already
try:
... (0 Replies)
Discussion started by: radioactive9
0 Replies
LEARN ABOUT HPUX
hp-mc680x0
machid(1) General Commands Manual machid(1)NAME
machid: hp9000s200, hp9000s300, hp9000s400, hp9000s500, hp9000s700, hp9000s800, hp-mc680x0, hp-pa, pdp11, u370, u3b, u3b10, u3b2, u3b5, vax
- provide truth value about processor type
SYNOPSIS DESCRIPTION
The following commands return a true value (exit code 0) if the a processor type matches the command name. Otherwise a false value (exit
code nonzero) is returned. These commands are commonly used within makefiles and shell procedures to improve portability of applications
(see make(1)).
+-----------+-------------------------++--------+--------------------------+
|Command | True for ||Command | True for |
+-----------+-------------------------++--------+--------------------------+
|hp9000s200 | Series 200 ||pdp11 | PDP-11/45 or PDP-11/70 |
|hp9000s300 | Series 300 ||u3b | 3B20 computer |
|hp9000s400 | Series 400 ||u3b2 | 3B2 computer |
|hp9000s500 | Series 500 ||u3b5 | 3B5 computer |
|hp9000s700 | Series 700 ||u3b10 | 3B10 computer |
|hp9000s800 | Series 800 or 700 ||u370 | IBM System/370 computer |
|hp-mc680x0 | Series 200, 300, or 400 ||vax | VAX-11/750 or VAX-11/780 |
|hp-pa | Series 700 or 800 || | |
+-----------+-------------------------++--------+--------------------------+
EXAMPLES
Given a shell script that must behave differently when run on an HP 9000 Series 700 or 800 system, select the correct code segment to be
executed:
WARNINGS
always returns true on both Series 800 and Series 700 systems. Therefore, when using this command in scripts to determine hardware type,
always use both and in the appropriate sequence to ensure correct results (see
machid(1) will no longer provide support for future machines beyond the Series 800 and Series 700 systems. Decisions should be based on
the hardware and software configuration information returned by getconf(1).
SEE ALSO getconf(1), make(1), sh(1), test(1), true(1).
machid(1)