Search Results

Search: Posts Made By: hongwei
4,445
Posted By hongwei
ls | xargs -I{} cp {} {}007
ls | xargs -I{} cp {} {}007
4,087
Posted By hongwei
The "LOOP" version: while read line;do ...
The "LOOP" version:

while read line;do
sed "s/$line//" file1 > tmpfile
cat tmpfile >file1
done < file2
1,565
Posted By hongwei
You missed blank chars ... if [ "$chris"...
You missed blank chars ...

if [ "$chris" -eq "$chris2" ]
19,081
Posted By hongwei
hardlink and softlink are quite different in...
hardlink and softlink are quite different in nature.

soft link is a type of disk file
hard link is a file attribute as an indication on how many directory entries ( mostly means file names ) are...
1,745
Posted By hongwei
More than one way to do this. Another way in...
More than one way to do this. Another way in addtion to using find command:


ls /Land/*/test.txt | xargs -I{} awk 'NR==2' {}
7,225
Posted By hongwei
I dont get what you mean by "enter the...
I dont get what you mean by "enter the [your-file-name] and [source-URL] parts on the same line with the "homeperm"
26,758
Posted By hongwei
What errors did you get when you were tring to...
What errors did you get when you were tring to run csh test.csh? Are you sure all of the things like syntax are correctly used in that script?
2,528
Posted By hongwei
2 ways I firgured out to meet your needs: 1)...
2 ways I firgured out to meet your needs:

1) check the stimestamp of the directory ( Because once a file created, the directory's modification time is necessarily updated ). Save the the last...
8,677
Posted By hongwei
yes, you get it. cd and echo commands are...
yes, you get it. cd and echo commands are implemented as part of shell itself, that is so called shell built-in. And thus these builtin command are always available in a running shell and have...
2,979
Posted By hongwei
Anyway make sure in the script you always use...
Anyway make sure in the script you always use full path names and explicitly set some env variables if used
4,295
Posted By hongwei
Another solution using awk: echo $str abcd...
Another solution using awk:

echo $str
abcd | fghfh | qwer | ertete
echo $str | awk -F'|' '{OFS="|";$NF="\n"$NF;print $0}'
abcd | fghfh | qwer |
ertete
9,397
Posted By hongwei
try this : get_number $VARIABLE | xargs -I{}...
try this :

get_number $VARIABLE | xargs -I{} myscript.sh param1 {}
3,927
Posted By hongwei
awk -F '\[|\||:|,' '{print $4, $9, $11}'
awk -F '\[|\||:|,' '{print $4, $9, $11}'
1,736
Posted By hongwei
Question regarding syntax of (lis) and { list;}
Hi there,

As you know, we can group a list of commands in either (list) form or { list;}. I know the difference between the two. (list) make the command list to be executed in a subshell while...
1,609
Posted By hongwei
How does $(<file) work?
If you enter " < myfile " on shell prompt directly, nothing to output. But for ' $(< myfile) ' , the contents of myfile replace $(< myfile). That has the same effect as ' $(cat myfile) '. I never...
2,236
Posted By hongwei
Yes, the following words from The Whole Story on...
Yes, the following words from The Whole Story on #! /usr/bin/ksh can explain my doubt ( in fact, I also guessed ksh works this way for this case)



However my confusion is still not completly...
2,236
Posted By hongwei
why the script name not displayed and not sh invoked?
Say there is a shell script named test.sh. I intentionally omit the #! line in test.sh for testing perpose. I did the following :

$ echo $0
-ksh --->...
4,616
Posted By hongwei
You must create it on your own. The .ssh is...
You must create it on your own. The .ssh is automatically created under an user's home directory only when you set up ssh client as that user.
Showing results 1 to 18 of 18

 
All times are GMT -4. The time now is 04:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy