10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello All,
Hope you're doing well !
I am trying below command to be passed in a shell script, header_date_14 is a variable and $1 is the name of a file I intend to pass as a command line argument, however command line argument is not being accepted.
header_date_14=$(m_dump... (8 Replies)
Discussion started by: ektubbe
8 Replies
2. Shell Programming and Scripting
hi,
i want to pass an array parameters to a sftp script so that i can transfer each file in the array to the remote server by connecting only once to the sftp remote server.
i thought of using a variable that contains list of file names separated by a space and pass the variable to the sftp... (3 Replies)
Discussion started by: Little
3 Replies
3. Shell Programming and Scripting
hi,
Is it possible to pass arguments to a sftp script and use those arguments in the program?
for example
sftp_script
FILENAME=$1
#!/usr/bin/expect
spawn /usr/bin/sftp abc@ftp.abc.com
expect "abc@ftp.abc.com's password:"
send "pass\r"
expect "sftp>"
send "mput $FILENAME\r"... (9 Replies)
Discussion started by: Little
9 Replies
4. Shell Programming and Scripting
Hi,
While m using gpg manually it works fine. I want to include this command in my auto script. how to pass the passphrase and Use this key anyway? (y/N) in my script. Advance thanks.
$ gpg --sign --output xx.gpg --encrypt --recipient GXS_CTE xx.ext
You need a passphrase to unlock the secret... (3 Replies)
Discussion started by: chakkaravarthy
3 Replies
5. Red Hat
Hi all,
Hereby wish to have your advise for below:
Main concept is
I intend to get current directory of my script file.
This script file will be copied to /etc/init.d.
A string in this copy will be replaced with current directory value.
Below is original script file:
... (6 Replies)
Discussion started by: cielle
6 Replies
6. Shell Programming and Scripting
Hello again :)
Am currently trying to write a function which will delete a record from a file.
The code currently looks as such:
function deleteRecord() {
clear
read -p "Please enter the ID of the record you wish to remove: " strID
... (2 Replies)
Discussion started by: U_C_Dispatj
2 Replies
7. Shell Programming and Scripting
ftp -i -n <<HERE
open $IPADD
user $USRNAME $PASS
cd /
get $FNAME
close
quit
HERE
Hi all the above script i used for ftp. How to modify same for sftp?
thanks in advance (10 Replies)
Discussion started by: bullz26
10 Replies
8. Shell Programming and Scripting
I am trying to pass 2 shell variable's ("START" and "END") define earlier in the script to this awk statement, but i can't seem to pass it on. PLs help.
set START = xxxx
set END = yyyy
set selected_file = `awk '/$START/,/$END/' filename` (24 Replies)
Discussion started by: Raynon
24 Replies
9. Shell Programming and Scripting
Can any one suggest me how to check the file extension and pass the name based out of the filename within the folder.
There would be always one latest file in the folder, but extension may vary...
ie .csv, .CSV,.rpt,.xls etc
what is best way to get the latest file name and pass as variable.... (1 Reply)
Discussion started by: u263066
1 Replies
10. UNIX for Dummies Questions & Answers
i would like to pass a variable to awk wherein the variable comes from external loop.
i tried this...
let x=0
until test $x -eq 32
do
cat file | awk '{ print $1 , "Number" , $($x) }' >> output
done
thanks, (4 Replies)
Discussion started by: inquirer
4 Replies