Search Results

Search: Posts Made By: alienET
4,111
Posted By alienET
Add string after line X
Hi all,

I'm trying in a script, to add a string after the line number one.

file=file.txt
text="it works"

sed '1i\ $text' < $file

But I'm getting the following err:
"Function 1i\ $text...
80,363
Posted By alienET
Worked!! :) Thank u everybody!! Thank...
Worked!!
:)

Thank u everybody!!
Thank u vigsgb!!
80,363
Posted By alienET
No problem.. I think I didn't explain well... ...
No problem..
I think I didn't explain well...

As u can see I'm beginner...
;O)

By the way.. do u know why when I do the following command, it doesn't consider the last line of my file1? I...
80,363
Posted By alienET
I'm in a script using this command and my input...
I'm in a script using this command and my input file is a list of path-file names, like this:


folderA/folderB/fileA
folderA/folderC/folderD/fileB


And what I want is to get each line, or...
80,363
Posted By alienET
Hi Kelam_Magnus I tried the awk '{...
Hi Kelam_Magnus


I tried the

awk '{ print $0 "\n" }' < myFile

and it still returns all the lines...
Don't know if makes any difference, but myFile is not a sh file...
80,363
Posted By alienET
Yes.. -d is the delimiter, but why it isn't...
Yes..

-d is the delimiter, but why it isn't recognizing the "\n" ?
Unfortunately the lines are not uniform in length..
80,363
Posted By alienET
cut - new line
Hello!!


I'm trying to get each line of a file, using cut and new line "\n" inside a script, but everytime I do the command it returns everything, not limited by the new line.
Am I using a...
15,027
Posted By alienET
Thank you very much!!! ;)
Thank you very much!!!

;)
15,027
Posted By alienET
Well I'm in a script and this list file is a...
Well I'm in a script and this list file is a result of a ls, with filenames in each line. I need them to do a command with each one.
Is it possible to read one line with cat command in a script and...
15,027
Posted By alienET
Read file - korn shell
Hello!!


I'm want to read each line of a file.
I'm doing a cut command, using \n - linefeed as delimeter and "list" as my file.


cut -f1 -d"\n" -s < list


Changing the file, putting...
13,352
Posted By alienET
sftp - how many files
Hello!!

Another sftp question...

I need to know inside the sftp environment how many files exists, or if there is any file, before I do a

mget *



Any ideas?

Thanks in advance
:O)
5,827
Posted By alienET
Command ignored after sftp - korn shell
Hi all

Trying to run my korn shell script, I got no messages after the sftp.
The "finished" msg is not being displayed.
Any ideas?

sftp $argument <<EOF
quit
EOF
echo "finished"


Thanks...
10,249
Posted By alienET
Hi all I got it working using mget *,...
Hi all


I got it working using mget *, instead of store the filenames in a array.
The list=`ls` command wasn't working, 'cause I was inside the sftp environment, and it wasn't recognizing.


...
10,249
Posted By alienET
korn shell + sftp + list files
Hello!!!

I need a korn shell script in AIX that inside sftp environment, changes a remote directory, lists the files inside it, and stores in an array.

I got it working before make a sftp, but...
4,444
Posted By alienET
OpenSSH: SFTP X SCP
Hi all,

I'm implementing some updates to my scripts that are now using ftp command.
I was thinking about replace it by SFTP.
Now I see that SCP does basically the same that SFTP.
So... what are...
Showing results 1 to 15 of 15

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