I have a file that has a list of entries in a column
x
z
z
z
x
y
z
The column can have any length and any number of any strings. I need to replace each unique string with a user defined number. I can filter the unique entries out using
awk '{if (NF==5) print $2}' file | uniq | nl >... (1 Reply)
I have the following string stored in a variable from a file
sbCvgXfsuupllsucpp11-aWa
I want to use sed to search for the string in a second file: FileSys.dat
sed -n "${obid}" FileSys.dat
I'm getting "sed: command garbled: sbCvgXfsuupllsucpp11-aWa"
The syntax seems fine...anyone... (2 Replies)
Hi everybody,
I am trying to do the thing you see in the title, and I can't simply do
a=$(svn up)
echo $a
because the program (svn) gives output on lots of lines and in the variable the output is stored on only one line (resulting in a horribly formatted text). Any tips?
Thanks,... (2 Replies)
All,
I am attempting to print the tenth ($COPY2) varaibales into one file.
But i am finding that all variables are being outputted except for $10.
Can someone help!!!!
Code Below
----------
echo $SERVER $IMAGE $IMAGEDAY $IMAGEMONTH $IMAGEYEAR $COPY1 $EXPIREDAY $EXPIREMONTH... (1 Reply)
Hi everyone,
Ok here's the scenario.
I have a control file like this.
component1,file1,file2,file3,file4,file5
component2,file1,file2,file3,file4,file5I want to do a while loop here to read all files for each component.
file_count=2
while ]
do
file_name=`cat list.txt | grep... (2 Replies)
Hi all,
Hereby wish to have your advise for below:
Main concept is
I intend to get current directory of my script file.
This script file will be copied to /etc/init.d.
A string in this copy will be replaced with current directory value.
Below is original script file:
... (6 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
couldn't print out stored variable in awk
2. Relevant commands, code, scripts, algorithms:
i have in a... (5 Replies)
I have a group of variables myLINEcnt1 - myLINEcnt10. I'm trying to printout the values using a for loop. I am at the head banging stage since i'm sure it has to be a basic syntax issue that i can't figure out.
For myIPgrp in 1 2 3 4 5 6 7 8 9 10; do
here i want to output the value of... (4 Replies)
Hi folks,
A really dumb question as I've wasted far too long trying to get this to work.... (on RH bash)
I have an array:
m0='<hello>'
m0='<there>'
m0='<fred>'
v0='<goodbye>'
v0='<again>'
v0='<john>'
in my code I calculate the value of the variable to output and if I echo it, I... (2 Replies)
Heyas
Me try to print only the value of a (specific) variable assignment from a file.
What i get (1):
:) tui $ bin/tui-conf-get ~/.tui_rc TUI_THEME
dot-blue
""
"$TUI_DIR_INSTALL_ROOT/usr"
"$TUI_DIR_INSTALL_ROOT/etc/tui"
"$TUI_PREFIX/share/doc/tui"
"$TUI_PREFIX/share/tui"... (2 Replies)
Discussion started by: sea
2 Replies
LEARN ABOUT HPUX
link
link(2) System Calls Manual link(2)NAME
link() - link to a file
SYNOPSIS DESCRIPTION
The system call creates a new link (directory entry) for the existing file. path1 points to a path name naming an existing file. path2
points to a path name naming the new directory entry to be created.
RETURN VALUE
Upon successful completion, returns zero. Otherwise, it returns -1 and sets (see errno(2)) to indicate the error.
ERRORS
The system call fails and no link is created if one or more of the following is true:
A component of either path prefix denies search permission.
The requested link requires writing in a directory
that does not permit writing.
The user's or group's disk quota block limit has been reached for this file system.
The link named by
path2 exists.
path points outside the allocated address space of the process. The reliable detection of this error is implementation
dependent.
Too many symbolic links were encountered in translating either path name.
The maximum number of links to a file would be exceeded.
Either the specified path exceeds
bytes, or a component of either specified path exceeds while is in effect.
The file named by
path1 does not exist.
A component of either path prefix does not exist.
path2 points to a null path name.
path1 or path2 is null.
The directory to contain the file cannot be extended.
A component of either path prefix is not a directory.
The file named by
path1 is a directory and the effective user ID is not a user who has appropriate privileges. Some file systems
return this error whenever path1 names a directory, regardless of the user ID.
The requested link requires writing in a directory
on a read-only file system.
The link named by
path2 and the file named by path1 are on different logical devices (file systems).
SEE ALSO cp(1), link(1M), symlink(2), unlink(2), symlink(4), privileges(5).
STANDARDS CONFORMANCE link(2)