Search Results

Search: Posts Made By: Soham
14,624
Posted By Soham
Rename (move) multiple files on remote server using sftp
I want to rename (move) multiple files on remote server. I tried the following command to move all TXT files from my_dir directory to /new_dir. But it does not work. Any help?


#!/bin/ksh
...
2,564
Posted By Soham
Great. Works perfect. Thank you very much.
Great. Works perfect. Thank you very much.
2,564
Posted By Soham
Ssh disturbs while loop
Hi all,

I have observed that ssh exits while loop.


#!/bin/ksh

typeset -i i
typeset -i size
set -A server = " " "SERVER1" "SERVER2"

i=2
while [[ $i -le 3 ]]
do
while read...
5,152
Posted By Soham
Thanks
Thanks
5,152
Posted By Soham
While within while is not working in Korn shell
Hi all,

I tried to execute a while within another while, but not working. Any suggestions? Thanks in advance



#!/bin/ksh

typeset -i i=1
typeset -i j=1

while [[ $i -lt 4 ]]
do
...
1,191
Posted By Soham
Sorry, I did not mention UNIX flavor. I am...
Sorry, I did not mention UNIX flavor. I am running on SunOS. It works with nawk.

I would say my input would be something like


User tty login@ idle JCPU PCPU what
user1 ...
1,191
Posted By Soham
It gives compilation error ...
It gives compilation error


/home/sdesai/rx/src> w | awk '{ gsub("[ ]+", "|"); print}'
awk: syntax error near line 1
awk: illegal statement near line 1


Even this is not sufficient if the...
1,191
Posted By Soham
Get the output of w command in pipe delimited format
Since output of w command have variable number of columns I want to get the output in pipe delimited format. I tried


export OFS="|"; w


but that does not work.

Any ideas?
1,857
Posted By Soham
RudiC, perl is available. Not rename UNIX...
RudiC,

perl is available. Not rename UNIX command.
1,857
Posted By Soham
Thanks. In fact I wanted a single command, but...
Thanks. In fact I wanted a single command, but this will work for me
1,857
Posted By Soham
Move multiple files to different directory using a single command
I have multiple files test1, test2, test3 etc. I want to move to a different directory with ABC_ prefixed to every file and and current dat time as postfix using a single command. (I will be using...
1,535
Posted By Soham
Difference between UNIX and Windows Disk storage
I have heard that UNIX disk storage is costlier than Windows Disk storage. Is that true? If not why we have limited storage on UNIX systems? Windows disk storage is so cheap nowadays. Is it not true...
4,226
Posted By Soham
Thanks. This is what I wanted. I do not know how...
Thanks. This is what I wanted. I do not know how I missed it from man pages !
10,698
Posted By Soham
Passing -f with rm command in sftp
Is there any way I can pass -f with rm command in sftp? If I use it it treats -f as a file name to be removed.



sftp> rm -f abcd
Couldn't stat remote file: No such file or directory
Removing...
4,226
Posted By Soham
We have some files/directory which are owned...
We have some files/directory which are owned by/having group which are numeric. I want to add this condition in find command.

Thx
4,226
Posted By Soham
List files whose owner or group is numeric
I want to add a condition is my find command to include files/sub-directory whose owner or group is all numeric number.

My current find command is


find . \( -user root -o -user soham\) -type...
1,040
Posted By Soham
This is correct. I see the desired results ...
This is correct. I see the desired results


tsthbs1:/tmp> cat a
#!/bin/ksh

#!/bin/ksh
awk '
{if ($1 == $2) {print $1,$2} }
' file
tsthbs1:/tmp> a
000EEB2A 000EEB2A
000EEB2D 000EEB2D...
4,670
Posted By Soham
Thanks. It works if you go to that directory and...
Thanks. It works if you go to that directory and start find command with fine .
But if it is find <dir> (i.e. instead of . give directory name) it does not work. But that's fine.

Thanks to all
4,670
Posted By Soham
No, this does not work because none of the...
No, this does not work because none of the files/sub-directories under current directory is owned by root/other. Some of the files under sub-dirctory are owned by root/other. Consider following

...
4,670
Posted By Soham
Rudic, Yes, find version provides ls...
Rudic,

Yes, find version provides ls version. If I give just find command, I get


/export/home> find . -user root -group other
./sparcs_1
./sparcs_2


Now under two directories sparcs_1...
4,670
Posted By Soham
I think I did not make it clear. ld will show me...
I think I did not make it clear. ld will show me only directory/sub-directories. I want all directory, sub-directories and files under the given directory have specified user/group.
4,670
Posted By Soham
Search for files owned by particular owner and group
I am searchingfor files owned by particular owner and group in a particular directory including its sub-directories. I use


find <dir> -user <user> -group <group> -exec ls -l {} \;


It does...
3,571
Posted By Soham
Thanks all. Disedorgue's 'just for fun'...
Thanks all.

Disedorgue's 'just for fun' solution worked for me with nawk.
3,571
Posted By Soham
SUN OS
SUN OS
3,571
Posted By Soham
Now some compilation error ksh: cat e ...
Now some compilation error


ksh: cat e
Line 1
Line 22
Line 33
Line 1
Line 22
Line 1
Line 4
Line 5
ksh:
ksh: PAT="Line 1"
ksh: awk 'NR==FNR { if(match($0, PAT)) P=NR ; next } FNR > P'...
Showing results 1 to 25 of 84

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