Search Results

Search: Posts Made By: FreddyDaKing
21,802
Posted By RudiC
This is where my smbmount proposal comes into...
This is where my smbmount proposal comes into play. You smbmount the remote resource and - voila - all your unix commands will work.

This is what I first thought of, but I'm not sure the result of...
21,802
Posted By methyl
Please always post what Operating System and...
Please always post what Operating System and version you are running and what Shell you use. There is so much variation.
Please also post the Operating System and version of the remote (Microsoft?)...
21,802
Posted By RudiC
Did this script ever work? AFAIK smbclient needs...
Did this script ever work? AFAIK smbclient needs commands from stdin, so a "here document" might work. Anyhow, the shell is NOT reading those lines after the smbclient command, and thus no variable...
21,802
Posted By pamu
It so weird that if command is not working...
It so weird that if command is not working there...

and i am doubtful about working of while...

still try this...


cd $dir_name
var=$(echo $?)
echo $var
while [ "$var" == 0 ]; do
echo...
21,802
Posted By pamu
We can also check for the presence of directory...
We can also check for the presence of directory ..


if [[ -d $dir_name ]]
then
#do what you want here..
fi
21,802
Posted By RudiC
Unfortunately I don't have an answer at hand, as...
Unfortunately I don't have an answer at hand, as a failing cd will complain likecd \Josef\: NT_STATUS_OBJECT_NAME_NOT_FOUND but evaluating this within a script is difficult.
Why don't you smbmount...
21,802
Posted By elixir_sinari
Only 2 is not failure. Check here...
Only 2 is not failure. Check here (https://www.unix.com/shell-programming-scripting/5020-all-about-exit-code.html).
21,802
Posted By pamu
Check last command status by $? echo "$?" ...
Check last command status by $?

echo "$?"


0 - Success
2 - Fail
9,704
Posted By mjf
Using awk, try cat input.file | awk '...
Using awk, try


cat input.file | awk ' BEGIN {print "Column1;Column2;Column3;Column4;Column5" } { print substr($0,1,6) ";" substr($0,7,5) ";" $2 ";" substr($0,26,6) ";" substr($0,7,5) ";" $2...
9,704
Posted By bartus11
Does it have to be AWK? perl -ple...
Does it have to be AWK? perl -ple 's/\b\d{6}/$&;/g;s/\s+/;/g' file
9,704
Posted By pamu
try this...
awk '{ print substr($1, 1, 6), substr($1, 7, 11) , $2 , substr($3, 1, 6), substr($3, 7, 11) }' OFS=\; test_temp
9,704
Posted By elixir_sinari
awk...
awk '{sub(/.{6}/,"&"OFS,$1);sub(/.{6}/,"&"OFS,$3)}1' OFS=";" file
Showing results 1 to 12 of 12

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