Assuming that your original file (which I shall call "filename") is a MSDOS text file with a carriage-return character in every record.
What is the output from this sequence of commands both from the command prompt and from a shell script. I'm assuming that your shell is not "csh" or "tcsh".
The "sed -n l" command just makes control codes visible.
Hello,
I'm stuck and confused as to why when I execute things form the command line it works but when in a script it doesn't.
My script:
### creating a lock on the console
touch /var/run/console.lock
chmod 600 /var/run/console.lock
echo "$User" >>... (2 Replies)
Command works but not in SH
At terminal if i type:
scp test.tar.gz user1@server2:/home/user
Everything run smoothly (keyed, no password need)
At script , test.sh
#!/bin/sh
scp test.tar.gz user1@server2:/home/user
Nothing happen and clue ? ? ? ? ? (3 Replies)
Hi,
We have an interesting issue which is similar to the one in this thread, but that never provided a full answer. - Ohh apparently I can't post URLs till I have 5 posts, sorry.
We have a simple script that copies files from one shelf to the other. Both shelves have an ssh banner defined. ... (3 Replies)
Hello all,
Something strange going on with a shell script I'm writing. It's trying to write a list of files that it finds in a given directory to another file. But I also have a skip list so matching files that are in that skip list should be, well uhm, skipped :)
Here's the code of my... (2 Replies)
I have simple script. like that, I am working on /usr/local/src and also under src folder there is a ft folder
#!/bin/ksh
#!/bin/bash
dirpath="/usr/local/src/ft"
echo $dirpath
cd $dirpath
echo displays ok "/usr/local/src/ft"
but that doesn't enter "ft" folder. stays in current... (4 Replies)
Hi All,
i created the below script to move file with xml extension from one directory to another,but the mv command is not working inside the shell script,
#!/us/bin/ksh
filepath="/apps/extract"
filename="*.xml"
foldername=2191POB000_$(date +%Y%m%d%H%M%S)
mkdir -p "$filepath/$foldername"... (3 Replies)
My first post evidently did not materialize so I posted it again:
Runnning a cron job every 5 mins to send data files to a state facility.
My original cron entry at worked fine:
01,06,11,16,21,26,31,36,41,46,51,56 * * * * /home/sftpuser/stateinoc-from-appname.ksh
Somewhere I have a... (1 Reply)
I have 10 application servers in a distributed architecture generating their own application logs. Each server has application utility to continuously tail the log. for example following command follows tails and follows new logfiles as they are generated
server1$ logutility logtype
When I run... (8 Replies)
Hi Team,
I my script i telent my node ip and after loging i run some commands...But some time login fail so i want to stop script at that time..
CONFIG_CHNG.sh
printf 'Please Input Node ID : '
read node
node="$node"
#exec > node_log_$node.log 2>&1
#set -x
>... (2 Replies)