Tag Info

New answers tagged

0

You can use sshfs. Install and setup sshfs. After setting up sshfs add this 2 alias to your .bashrc. alias fuse-mo='sshfs remote_user@remote_server:/home/ternovi/your_local_folder /home/remote_user/folder_with_file -o idmap=user -o reconnect' alias fuse-um='fusermount -u /home/ternovi/your_local_folder' Now create folder /home/ternovi/your_local_folder ...


0

What do you mean by "read" the file? If you just want to echo the contents back to the STDOUT, then this should do it. ssh user@remoteHostName 'tail -f /myDirectory/myFile.txt' That should work if you have SSH set up properly, "user" is a valid user on your remote host, and the -f flag on the tail command will allow it to view a file as it grows.


1

You can try the following bash function #!/bin/bash function get_password(){ echo "Enter wour password: " read password if [[ -n "$password" ]]; then a=$(echo $password | tr -d "\n" | wc -c) b=$(echo $password | tr -cd "[:alnum:]" | wc -c) if [[ $a != $b ]]; then echo "Plz enter alphanumeric words" ...


1

Use pipes to successively filter the lines, until you get what you want:grep word1 /path | grep word2 | grep word3 | grep word4



Top 50 recent answers are included