Pseudocode which doesn't do what you want really doesn't tell us what you do want. What is $1 here? And what is 'grep $1' for? It's not going to do anything where you've put it.
Also, I noted above that [ -f * ] is a bad idea since it will fail with syntax errors whenever you match more than one file.
Also, you're still not quoting any of your variables and really should be.
thanks Corona688 for the explanation.
my bad, I didn't explain it clearly.
the requests is pass a value (eg: v$abc) when calling the script, get file directory and file name from master file. (below is sample master file), then go to corresponding directory, rename file (may need split the file as well). below pseudocode is testing code to check I can use variable with "$" sign. yes, there may have more than one files matching. could you please advise the best way to handle multiple matches. thanks in advance
hey there
im a bit stuck on executing commands that include the special character '?'. can someone recommend a way on how i would be able to execute it?? i thought the glob function could be useful (still mite be) but upon entering the command
'ls pars?' it listed all the files in the... (1 Reply)
Hi ,
I am doing invert grep using -v but the string contain "/" which break the grep command and it do not skip the lines with "/" on it.
Diffu.txt
========
1159c1159
< <td align="right" valign="middle" class="paddingRight2px" id="featureListItemChannelButton7466">
---
> <td... (1 Reply)
Hi,
I am trying to unload file from a database. Which contains few lines with the character below. Rest of the data was unloaded appropriately.
a) What does this below character means?
b) How can i remove it,
I already have sed '/^$/d'
c) Will this effect the file by any means... (4 Replies)
Hi,
In the shell script, i need to remove the special charater "\" with "\\". For example, i need to replace "D:\FXT\ABC.TXT" with "D:\\FXT\\ABC.TXT".
However, when trying to do something like , i get the below error :-
-->echo "D:\FXT\ABC.TXT" | sed -e 's#\#\\#g'
sed: 0602-404 Function... (7 Replies)
I have below line in a unix file, I want to delete one character after "Â".
20091020.Non-Agency CMO Daily Trade Recap Â~V Hybrids
The result should be :
20091020.Non-Agency CMO Daily Trade Recap  Hybrids
i dont want to use "~V" anywhere in the sed command or any other command, just remove... (1 Reply)
I'm having issue capturing a value from file.list with a multiple spaces in a variable $i, tried various options like using double quotes, no quotes, single quotes, curly braces but to no avail.
cat file.list
aaa test bbb
ccc test ddd
eee test fff
for i in `cat file.list`
do
echo "$i";... (2 Replies)
Hi ,
I have input file like below
Hi this is "vinoth".
Hi happy to work with 'unix'
USA(united states of America)
My script variables are below :
Dquote=Ộ
Squote=&#$567
Obrac=&^986
Cbrac=&^745
I want to read the variables in my SED command to replace the double quote,single... (9 Replies)
When editing a file, vi displays a special character as ^L. Can you tell me the escaped character to be used in awk? And can that escaped character be used in a regexp in both sed and awk? (7 Replies)
Hello Folks,
Need to bisect strings based on a subset.
Below works good.
echo /a/b/c/d | awk -F"/c/d$" '{print $1}'
/a/b
However, it goes awry with special characters.
echo /a/b/c+/d | awk -F"/c+/d$" '{print $1}'
/a/b/c+/d
Desired output:
/a/b
Escaping the special characters... (11 Replies)
Hi,
on ksh
What does the following do?
grep -v "toolbox" $home_oracle/.profile >$home_oracle/.profile.$$ Thanks.
Please use CODE tags as required by forum rules! (3 Replies)
Discussion started by: big123456
3 Replies
LEARN ABOUT HPUX
show_child
show child(1m) show child(1m)NAME
show child - Displays attribute information about the specified child pointer
SYNOPSIS
cdscp show child child-name [attribute-name] [with attribute-name = attribute-value]
ARGUMENTS
The full name of a specific child pointer. The last simple name can contain wildcard characters. The name of an attribute; see Descrip-
tion for valid attribute names. The value of a particular attribute.
DESCRIPTION
The show child command displays the names and values of the attributes specified in attribute-name. You can use a combination of
attributes in a single command. Use a space to separate multiple attributes. You can use a with attribute-name = attribute-value clause to
limit output only to child pointers whose attributes have values equal to the specified values. A space must precede and follow the =
(equals sign).
If you do not supply any attributes, the command displays all attributes and their values. The following is a description of child pointer
attributes: Specifies the creation timestamp (CTS) of the specified child pointer. Specifies the unique identifier of the directory to
which the child pointer refers. Specifies the address, UUID, and name of a set of clearinghouses where a copy of the child directory ref-
erenced by the child pointer is located. This attribute also specifies whether the directory in a particular clearinghouse is a master or
read-only replica. Specifies the timestamp of the most recent update to an attribute of the child pointer.
Privilege Required
You must have read permission to the child pointer. If you specify a wildcard child name, you also need read permission to the parent
directory.
NOTE
This command is replaced at Revision 1.1 by the dcecp command and may not be provided in future releases of DCE.
EXAMPLE
The following command displays all of the attributes and values of the child directory to which the child pointer /.:/admin refers: cdscp>
show child /.:/admin
SHOW
CHILD /.../abc.com/admin
AT 1991-10-15-15:56:01
CDS_CTS = 1991-10-15-19:55:52.000000003/08-00-2b-1c-8f-1f
CDS_UTS = 1991-10-15-19:55:52.000000006/08-00-2b-1c-8f-1f
CDS_ObjectUUID = 6b5362e8-8b1c-11ca-8981-08002b0f79aa
CDS_Replicas = :
Clearinghouse's UUID = 2ab024a8-8b1a-11ca-8981-08002b0f79aa
Tower = ncadg_ip_udp:16.18.16.32
Tower = ncacn_ip_tcp:16.18.16.32
Replica type = master
Clearinghouse's Name = /.../abc.com/Boston_CH
RELATED INFORMATION
Commands: create child(1m), delete child(1m), list child(1m)
show child(1m)